ci: sync GitHub pushes to Forgejo
Some checks failed
build-and-release / build (push) Failing after 1s
Some checks failed
build-and-release / build (push) Failing after 1s
This commit is contained in:
parent
6604842788
commit
48ef3e23f5
1 changed files with 10 additions and 8 deletions
18
.github/workflows/sync-to-forgejo.yml
vendored
18
.github/workflows/sync-to-forgejo.yml
vendored
|
|
@ -7,6 +7,13 @@ on:
|
|||
- high-performance
|
||||
workflow_dispatch:
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
concurrency:
|
||||
group: sync-to-forgejo-${{ github.ref }}
|
||||
cancel-in-progress: true
|
||||
|
||||
jobs:
|
||||
sync:
|
||||
runs-on: ubuntu-latest
|
||||
|
|
@ -26,11 +33,6 @@ jobs:
|
|||
FORGEJO_TOKEN: ${{ secrets.FORGEJO_TOKEN }}
|
||||
run: |
|
||||
set -euo pipefail
|
||||
# Add Forgejo remote
|
||||
git remote add forgejo "https://admin:${FORGEJO_TOKEN}@ci.nxtgauge.com/ashwin/nxtgauge-frontend-solid.git" 2>/dev/null || \
|
||||
git remote set-url forgejo "https://admin:${FORGEJO_TOKEN}@ci.nxtgauge.com/ashwin/nxtgauge-frontend-solid.git"
|
||||
|
||||
# Push current branch to Forgejo
|
||||
git push forgejo HEAD:${GITHUB_REF#refs/heads/} --force
|
||||
|
||||
echo "✅ Successfully synced ${GITHUB_REF} to Forgejo"
|
||||
git remote add forgejo "https://admin:${FORGEJO_TOKEN}@ci.nxtgauge.com/ashwin/${{ github.event.repository.name }}.git" 2>/dev/null || \
|
||||
git remote set-url forgejo "https://admin:${FORGEJO_TOKEN}@ci.nxtgauge.com/ashwin/${{ github.event.repository.name }}.git"
|
||||
git push forgejo "HEAD:${GITHUB_REF#refs/heads/}" --force
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue