198 Commits

Author SHA1 Message Date
Igor Pecovnik
081dcc8a05 Optimize sync workflow: cache NetBox data, remove debs-beta sync
- Cache server configuration (name, path, port, username, download_path) in Prepare job matrix
- Remove duplicate NetBox API fetches from Sync job
- Remove excessive validations (data already validated in Prepare job)
- Remove debs-beta sync entirely - only sync debs repository
- Simplify rsync logic - single target (debs) instead of case statement
- Reduce code from ~400 lines to ~120 lines
2026-01-06 01:48:38 +01:00
Igor Pecovnik
91b0ec4daf Add Infrastructure: Repository sync workflow with security enhancements
Implements automated repository synchronization to mirror servers with:
- Proper input validation (SSRF protection, hostname/port/path validation)
- Enhanced error handling with set -e and set -o pipefail
- Secret validation before use
- Conditional sync based on timestamp comparison (10-hour threshold)
- Support for forced sync via workflow dispatch
- Two-phase rsync (initial + cleanup with --delete)
- Support for both debs and debs-beta repositories
- Comprehensive logging to GitHub step summaries
- Team membership check for manual execution
- Scheduled runs every 4 hours

Security improvements:
- API URL format validation to prevent SSRF
- Hostname format validation
- Port range validation (1-65535)
- Username format validation (alphanumeric + ._-)
- Path traversal prevention (.. check)
- All paths validated against expected prefixes

Signed-off-by: Igor Pecovnik <igor@armbian.com>
2026-01-04 20:00:10 +01:00
Igor Pecovnik
cfefe214a2 Adjust cleaning to new repo handling tool, adjust permissions 2026-01-03 21:24:04 +01:00
Igor
3298112c25 Don't delete artifacts 2026-01-03 19:51:29 +01:00
Igor Pecovnik
5f220d3d03 Add copying mechanism to workflow
- Add INCOMING_PATH environment variable for staging files
- Add new Copying job that handles moving files from incoming to storage
- Copying job processes different targets (stable, cron, nightly, etc.)
- Remove Payload job and xx.yml workflow file
- Change Check job runner from ubuntu-latest to Linux
- Update external job dependency from Check to Copying
2026-01-03 18:10:48 +01:00
Igor Pecovnik
8b823a7086 Add testing script 2026-01-03 15:51:12 +01:00
Igor
c64bb27df9 Change runner from ubuntu-latest to Linux 2026-01-03 15:42:48 +01:00
Igor Pecovnik
348756629e Enlarge timeout for uploading images to cache 2026-01-03 15:30:24 +01:00
Igor Pecovnik
5dc25888db Show payload 2026-01-03 13:17:35 +01:00
Igor Pecovnik
10fbf66fd2 Set default value when executing from repository dispatch 2026-01-03 13:01:40 +01:00
Igor Pecovnik
c429cfba1f Reverske condition logic 2026-01-02 23:33:03 +01:00
Igor Pecovnik
410467f5c2 Adjust pipeline logic to allow repo management without external pkg download 2026-01-02 20:48:19 +01:00
Igor Pecovnik
ae1c71d2dd Update repository workflow with hardening and security improvements
- Add comprehensive input validation for all paths and parameters
- Implement SSRF prevention for API calls
- Add format validation for hostnames, usernames, and ports
- Enhance NetBox API error handling and validation
- Improve permission management with safety checks
- Add dry-run support for sync operations
- Strengthen repository path validation throughout
- Enhance security for beta repository operations

Signed-off-by: Igor Pecovnik <igor@armbian.com>
2026-01-02 16:52:54 +01:00
Igor
5c88453cfd Add workflow_dispatch trigger to partners data update 2026-01-01 10:48:24 +01:00
dependabot[bot]
0cb9403679 Bump actions/checkout from 4 to 6
Bumps [actions/checkout](https://github.com/actions/checkout) from 4 to 6.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v4...v6)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-version: '6'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-12-31 13:41:23 +01:00
dependabot[bot]
90bc5b9f08 Bump actions/upload-artifact from 4 to 6
Bumps [actions/upload-artifact](https://github.com/actions/upload-artifact) from 4 to 6.
- [Release notes](https://github.com/actions/upload-artifact/releases)
- [Commits](https://github.com/actions/upload-artifact/compare/v4...v6)

---
updated-dependencies:
- dependency-name: actions/upload-artifact
  dependency-version: '6'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-12-31 13:41:12 +01:00
dependabot[bot]
0505ba1658 Bump geekyeggo/delete-artifact from 4 to 5
Bumps [geekyeggo/delete-artifact](https://github.com/geekyeggo/delete-artifact) from 4 to 5.
- [Release notes](https://github.com/geekyeggo/delete-artifact/releases)
- [Changelog](https://github.com/GeekyEggo/delete-artifact/blob/main/CHANGELOG.md)
- [Commits](https://github.com/geekyeggo/delete-artifact/compare/v4...v5)

---
updated-dependencies:
- dependency-name: geekyeggo/delete-artifact
  dependency-version: '5'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-12-31 13:39:41 +01:00
dependabot[bot]
95a6936643 Bump tj-actions/changed-files from 46 to 47
Bumps [tj-actions/changed-files](https://github.com/tj-actions/changed-files) from 46 to 47.
- [Release notes](https://github.com/tj-actions/changed-files/releases)
- [Changelog](https://github.com/tj-actions/changed-files/blob/main/HISTORY.md)
- [Commits](https://github.com/tj-actions/changed-files/compare/v46...v47)

---
updated-dependencies:
- dependency-name: tj-actions/changed-files
  dependency-version: '47'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-12-31 13:38:43 +01:00
Igor
74bef46693 Update workflow to use infrastructure-reusable-mirror 2025-12-29 21:20:19 +01:00
Igor Pecovnik
b948320484 Fix workflow: correct name, remove duplicate commands, fix paths
- Update workflow name from "Rewrite kernel configs" to "Update image-info.json"
- Remove unused matrix outputs from job configuration
- Fix duplicate cd command in commit step
- Fix git add path to use correct data/image-info.json
- Correct commit message to describe actual change
- Rename job from build-matrix to update-image-info

Signed-off-by: Igor Pecovnik <igor@armbian.com>
2025-12-29 17:19:50 +01:00
Igor
287779b5f4 Update default releases in workflow file 2025-12-29 08:50:15 +01:00
Igor
2109c0ecc0 Revert purge enablement (#121)
* Improve package version check and repository management

- Replace apt-cache with direct HTTP queries to Armbian repository
  package indices for reliable version detection across all components
- Add repository cleanup jobs (preclean/postclean) to purge old
  package versions and keep only newest
- Implement retry logic (3 attempts) for aptly mirror update
  operations with automatic mirror recreation on failure
- Add download validation to ensure .deb files are actually downloaded
- Add HIDE_NO_UPDATE input option for controlling summary output
- Always sync to debs-beta, sync to debs only on actual version updates
- Enhanced debugging with comprehensive logging for aptly operations

* Fix syntax for PURGE variable in workflow

* Fix
2025-12-29 01:25:45 +01:00
Igor
cdd6536736 Fix syntax for PURGE variable in workflow 2025-12-29 00:48:39 +01:00
Igor Pecovnik
7348f4c04e Improve package version check and repository management
- Replace apt-cache with direct HTTP queries to Armbian repository
  package indices for reliable version detection across all components
- Add repository cleanup jobs (preclean/postclean) to purge old
  package versions and keep only newest
- Implement retry logic (3 attempts) for aptly mirror update
  operations with automatic mirror recreation on failure
- Add download validation to ensure .deb files are actually downloaded
- Add HIDE_NO_UPDATE input option for controlling summary output
- Always sync to debs-beta, sync to debs only on actual version updates
- Enhanced debugging with comprehensive logging for aptly operations
2025-12-28 22:53:24 +01:00
Igor Pecovnik
3b697c2e3d Always sync to beta.armbian.com 2025-12-27 20:39:20 +01:00