mirror of
https://github.com/theupriser/steamify-cachyos.git
synced 2026-10-03 17:41:58 +02:00
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.
This commit is contained in:
1 parent
d44f29956a
commit
a232a55bef
4 files changed
+32
-6
No files matched your search
@@ -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)"
|
||||
@@ -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"
|
||||
Reference in new issue
Block a user