Fix Forgejo workflows for the actual server capabilities
- package.yml: use correct Arch registry upload (octet-stream + binary body + PUT /api/packages/Breadway/arch/os), drop --privileged, remove actions/checkout (archlinux image has no Node) in favour of a manual shell clone, use the built-in Actions token instead of a stored secret, and --nocheck (tests belong in CI, not packaging) - mirror.yml: clone --mirror + explicit refs/heads + refs/tags push with --prune, instead of pushing refs/remotes pollution from a checkout - pacman.conf: correct Server URL to the Forgejo Arch registry format Requires only the GITHUB_MIRROR_TOKEN secret (GitHub PAT, repo scope) for the mirror job; package publishing uses the automatic per-run token.
This commit is contained in:
parent
baff024016
commit
267f6df523
3 changed files with 36 additions and 39 deletions
|
|
@ -9,12 +9,13 @@ jobs:
|
|||
mirror:
|
||||
runs-on: [self-hosted, hestia]
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Push to GitHub
|
||||
- name: Mirror to GitHub
|
||||
run: |
|
||||
git remote add github \
|
||||
"https://x-access-token:${{ secrets.GITHUB_MIRROR_TOKEN }}@github.com/Breadway/bos.git"
|
||||
git push github --mirror
|
||||
set -euo pipefail
|
||||
git clone --mirror "${GITHUB_SERVER_URL}/${GITHUB_REPOSITORY}.git" repo.git
|
||||
cd repo.git
|
||||
# Mirror only branches and tags (not refs/pull/*, which GitHub rejects);
|
||||
# --prune deletes GitHub refs that no longer exist on Forgejo.
|
||||
git push --prune \
|
||||
"https://x-access-token:${{ secrets.GITHUB_MIRROR_TOKEN }}@github.com/Breadway/bos.git" \
|
||||
'+refs/heads/*:refs/heads/*' '+refs/tags/*:refs/tags/*'
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue