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
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v4
|
env:
|
||||||
with:
|
FORGEJO_TOKEN: ${{ secrets.FORGEJO_TOKEN }}
|
||||||
fetch-depth: 0
|
run: |
|
||||||
token: ${{ secrets.FORGEJO_TOKEN }}
|
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
|
- name: Skip if latest commit is already a release commit
|
||||||
run: |
|
run: |
|
||||||
|
|
@ -59,11 +64,12 @@ jobs:
|
||||||
echo "Bumping $CURRENT → $NEXT"
|
echo "Bumping $CURRENT → $NEXT"
|
||||||
|
|
||||||
- name: Update VERSION and push bump commit
|
- name: Update VERSION and push bump commit
|
||||||
|
env:
|
||||||
|
FORGEJO_TOKEN: ${{ secrets.FORGEJO_TOKEN }}
|
||||||
run: |
|
run: |
|
||||||
NEXT="${{ steps.next.outputs.next }}"
|
NEXT="${{ steps.next.outputs.next }}"
|
||||||
printf '%s\n' "$NEXT" > VERSION
|
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 add VERSION
|
||||||
git commit -m "chore(release): bump version to $NEXT"
|
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'
|
ext: '.exe'
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v4
|
env:
|
||||||
with:
|
FORGEJO_TOKEN: ${{ secrets.FORGEJO_TOKEN }}
|
||||||
fetch-depth: 0
|
run: |
|
||||||
token: ${{ secrets.FORGEJO_TOKEN }}
|
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
|
- name: Setup Go
|
||||||
uses: actions/setup-go@v5
|
uses: https://code.forgejo.org/actions/setup-go@v5
|
||||||
with:
|
with:
|
||||||
go-version: '1.26'
|
go-version: '1.26'
|
||||||
cache: true
|
|
||||||
|
|
||||||
- name: Build binary
|
- name: Build binary
|
||||||
env:
|
env:
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue