From 8173ea7527fe2fbfce11d5405d39f73cbf98ee72 Mon Sep 17 00:00:00 2001 From: Rick Peters Date: Wed, 30 Sep 2026 08:12:06 +0200 Subject: [PATCH] feat(ci): sync the git.upriser.nl mirror on every push to main and every tag New git-upriser-sync.yml calls the mirror-sync API (secrets GIT_UPRISER_URL, GIT_UPRISER_TOKEN; retried; skipped on Gitea). bundle.yml dispatches the renamed iso-1-github-tag.yml in the right repo name; docs follow. --- .github/workflows/bundle.yml | 6 +++--- .github/workflows/git-upriser-sync.yml | 26 ++++++++++++++++++++++++++ AGENTS.md | 4 ++-- README.md | 2 +- 4 files changed, 32 insertions(+), 6 deletions(-) create mode 100644 .github/workflows/git-upriser-sync.yml diff --git a/.github/workflows/bundle.yml b/.github/workflows/bundle.yml index 328155c..b0cc3ab 100644 --- a/.github/workflows/bundle.yml +++ b/.github/workflows/bundle.yml @@ -193,7 +193,7 @@ jobs: assets/steam-gaming-settings.svg # A new Steamify release starts the Steamify ISO's release with it (a test build from the ISO repo's - # feat/steamify, until that is its master): its iso-release.yml names it after this version, tags it, + # feat/steamify, until that is its master): its iso-1-github-tag.yml names it after this version, tags it, # and the Gitea mirror builds and attaches the ISO. Needs a fine-grained token for that repo # (Actions: read and write) as the secret ISO_DISPATCH_TOKEN; without it, this is skipped. - name: Start the Steamify ISO's release @@ -207,5 +207,5 @@ jobs: if [ -z "$GH_TOKEN" ]; then echo "::notice::No ISO_DISPATCH_TOKEN: the Steamify ISO isn't released with this version."; exit 0 fi - gh workflow run iso-release.yml -R theupriser/steammachine-cachyos-live-iso --ref feat/steamify - echo "Started the Steamify ISO's release (theupriser/steammachine-cachyos-live-iso, feat/steamify)" + gh workflow run iso-1-github-tag.yml -R theupriser/steamify-cachyos-live-iso --ref feat/steamify + echo "Started the Steamify ISO's release (theupriser/steamify-cachyos-live-iso, feat/steamify)" diff --git a/.github/workflows/git-upriser-sync.yml b/.github/workflows/git-upriser-sync.yml new file mode 100644 index 0000000..e27b3be --- /dev/null +++ b/.github/workflows/git-upriser-sync.yml @@ -0,0 +1,26 @@ +name: Sync git.upriser.nl mirror + +# Trigger the Gitea pull-mirror immediately instead of waiting for its interval, +# so Gitea builds/releases the ISO right after main or a tag lands on GitHub. +on: + push: + branches: [main] + tags: ['*'] + workflow_dispatch: + +jobs: + sync: + # Gitea also reads .github/workflows on the mirror; only run on GitHub + if: github.server_url == 'https://github.com' + runs-on: ubuntu-latest + steps: + - name: Trigger mirror-sync + env: + GITEA_URL: ${{ secrets.GIT_UPRISER_URL }} + GIT_UPRISER_TOKEN: ${{ secrets.GIT_UPRISER_TOKEN }} + # Gitea "owner/repo"; defaults to the same path as on GitHub + GITEA_REPO: ${{ vars.GITEA_REPO || github.repository }} + run: | + curl --fail-with-body -sS --retry 5 --retry-delay 10 --retry-all-errors -X POST \ + -H "Authorization: token ${GIT_UPRISER_TOKEN}" \ + "${GITEA_URL%/}/api/v1/repos/${GITEA_REPO}/mirror-sync" diff --git a/AGENTS.md b/AGENTS.md index 541b352..54da57b 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -73,7 +73,7 @@ gamescope and the Plasma desktop. Primary target: the Valve Steam Machine `upload-artifact@v4` on GitHub and `christopherhx/gitea-upload-artifact@v4` elsewhere: never mention `upload-artifact@v3`, GitHub fails a workflow for a deprecated version even in a skipped step); the release is `gh` on GitHub and `akkuman/gitea-release-action` on Gitea. A new release on GitHub also starts the - Steamify ISO's release (`gh workflow run iso-release.yml` in steammachine-cachyos-live-iso, secret + Steamify ISO's release (`gh workflow run iso-1-github-tag.yml` in steamify-cachyos-live-iso, secret `ISO_DISPATCH_TOKEN`; skipped without it): the ISO repo's GitHub tag names it, the Gitea mirror builds it. CI (`.github/workflows/bundle.yml`) publishes the bundle as release `v$VERSION` on pushes to `main`; an existing version is never overwritten, @@ -308,7 +308,7 @@ gamescope and the Plasma desktop. Primary target: the Valve Steam Machine (`state_get vram installed_pkgs`). - Install-time mode (`steamify.sh --defaults`, 2.6.0): applies what the menu would preselect, no menu or prompts (needs passwordless sudo). The Steam - Machine ISO ([steammachine-cachyos-live-iso](https://github.com/theupriser/steammachine-cachyos-live-iso)) + Machine ISO ([steamify-cachyos-live-iso](https://github.com/theupriser/steamify-cachyos-live-iso)) runs it in the installer for a user who has never logged in: no session bus, user systemd or plasmashell. So every `systemctl --user` goes through `user_systemctl` (`lib/common.sh`; without a session only unit files change, diff --git a/README.md b/README.md index 218843d..08a0da8 100644 --- a/README.md +++ b/README.md @@ -94,7 +94,7 @@ curl -fsSL https://github.com/theupriser/steamify-cachyos/releases/latest/downlo ``` Installing CachyOS on a Steam Machine? The -[Steamify CachyOS ISO](https://github.com/theupriser/steammachine-cachyos-live-iso) +[Steamify CachyOS ISO](https://github.com/theupriser/steamify-cachyos-live-iso) has Steamify built into the installer: pick the options there, and the first boot is already set up.