fix(ci): use git clone instead of actions/checkout for Forgejo runner
Some checks failed
bump-version / bump (push) Failing after 1s
Some checks failed
bump-version / bump (push) Failing after 1s
This commit is contained in:
parent
ed2b8b675c
commit
727a71bd6e
2 changed files with 21 additions and 13 deletions
|
|
@ -14,10 +14,15 @@ jobs:
|
|||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 0
|
||||
token: ${{ secrets.FORGEJO_TOKEN }}
|
||||
env:
|
||||
FORGEJO_TOKEN: ${{ secrets.FORGEJO_TOKEN }}
|
||||
run: |
|
||||
set -euo pipefail
|
||||
HOST=${GITHUB_SERVER_URL#http://}
|
||||
git clone "http://x-access-token:${FORGEJO_TOKEN}@${HOST}/${GITHUB_REPOSITORY}.git" .
|
||||
git checkout "$GITHUB_SHA"
|
||||
git config user.name "forgejo-actions[bot]"
|
||||
git config user.email "forgejo-actions[bot]@noreply.local"
|
||||
|
||||
- name: Skip if latest commit is already a release commit
|
||||
run: |
|
||||
|
|
@ -59,11 +64,12 @@ jobs:
|
|||
echo "Bumping $CURRENT → $NEXT"
|
||||
|
||||
- name: Update VERSION and push bump commit
|
||||
env:
|
||||
FORGEJO_TOKEN: ${{ secrets.FORGEJO_TOKEN }}
|
||||
run: |
|
||||
NEXT="${{ steps.next.outputs.next }}"
|
||||
printf '%s\n' "$NEXT" > VERSION
|
||||
git config user.name "forgejo-actions[bot]"
|
||||
git config user.email "forgejo-actions[bot]@noreply.${FORGEJO_DOMAIN:-src.sersofts.org}"
|
||||
git add VERSION
|
||||
git commit -m "chore(release): bump version to $NEXT"
|
||||
git push origin HEAD:main
|
||||
HOST=${GITHUB_SERVER_URL#http://}
|
||||
git push "http://x-access-token:${FORGEJO_TOKEN}@${HOST}/${GITHUB_REPOSITORY}.git" HEAD:main
|
||||
|
|
|
|||
|
|
@ -34,16 +34,18 @@ jobs:
|
|||
ext: '.exe'
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 0
|
||||
token: ${{ secrets.FORGEJO_TOKEN }}
|
||||
env:
|
||||
FORGEJO_TOKEN: ${{ secrets.FORGEJO_TOKEN }}
|
||||
run: |
|
||||
set -euo pipefail
|
||||
HOST=${GITHUB_SERVER_URL#http://}
|
||||
git clone "http://x-access-token:${FORGEJO_TOKEN}@${HOST}/${GITHUB_REPOSITORY}.git" .
|
||||
git checkout "$GITHUB_SHA"
|
||||
|
||||
- name: Setup Go
|
||||
uses: actions/setup-go@v5
|
||||
uses: https://code.forgejo.org/actions/setup-go@v5
|
||||
with:
|
||||
go-version: '1.26'
|
||||
cache: true
|
||||
|
||||
- name: Build binary
|
||||
env:
|
||||
|
|
|
|||
Loading…
Reference in a new issue