ci: bump actions/setup-go to v7, use public Forgejo host
All checks were successful
bump-version / bump (push) Successful in 2s
All checks were successful
bump-version / bump (push) Successful in 2s
This commit is contained in:
parent
727a71bd6e
commit
d2b4827bb9
4 changed files with 16 additions and 11 deletions
|
|
@ -5,6 +5,10 @@ on:
|
||||||
branches: [main]
|
branches: [main]
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
|
|
||||||
|
env:
|
||||||
|
FORGEJO_HOST: src.sersofts.org
|
||||||
|
FORGEJO_PROTOCOL: https
|
||||||
|
|
||||||
concurrency:
|
concurrency:
|
||||||
group: bump-version
|
group: bump-version
|
||||||
cancel-in-progress: false
|
cancel-in-progress: false
|
||||||
|
|
@ -18,8 +22,7 @@ jobs:
|
||||||
FORGEJO_TOKEN: ${{ secrets.FORGEJO_TOKEN }}
|
FORGEJO_TOKEN: ${{ secrets.FORGEJO_TOKEN }}
|
||||||
run: |
|
run: |
|
||||||
set -euo pipefail
|
set -euo pipefail
|
||||||
HOST=${GITHUB_SERVER_URL#http://}
|
git clone "${FORGEJO_PROTOCOL}://x-access-token:${FORGEJO_TOKEN}@${FORGEJO_HOST}/${GITHUB_REPOSITORY}.git" .
|
||||||
git clone "http://x-access-token:${FORGEJO_TOKEN}@${HOST}/${GITHUB_REPOSITORY}.git" .
|
|
||||||
git checkout "$GITHUB_SHA"
|
git checkout "$GITHUB_SHA"
|
||||||
git config user.name "forgejo-actions[bot]"
|
git config user.name "forgejo-actions[bot]"
|
||||||
git config user.email "forgejo-actions[bot]@noreply.local"
|
git config user.email "forgejo-actions[bot]@noreply.local"
|
||||||
|
|
@ -71,5 +74,4 @@ jobs:
|
||||||
printf '%s\n' "$NEXT" > VERSION
|
printf '%s\n' "$NEXT" > VERSION
|
||||||
git add VERSION
|
git add VERSION
|
||||||
git commit -m "chore(release): bump version to $NEXT"
|
git commit -m "chore(release): bump version to $NEXT"
|
||||||
HOST=${GITHUB_SERVER_URL#http://}
|
git push "${FORGEJO_PROTOCOL}://x-access-token:${FORGEJO_TOKEN}@${FORGEJO_HOST}/${GITHUB_REPOSITORY}.git" HEAD:main
|
||||||
git push "http://x-access-token:${FORGEJO_TOKEN}@${HOST}/${GITHUB_REPOSITORY}.git" HEAD:main
|
|
||||||
|
|
|
||||||
|
|
@ -6,6 +6,10 @@ on:
|
||||||
- 'v*.*.*'
|
- 'v*.*.*'
|
||||||
- 'v*.*.*-*'
|
- 'v*.*.*-*'
|
||||||
|
|
||||||
|
env:
|
||||||
|
FORGEJO_HOST: src.sersofts.org
|
||||||
|
FORGEJO_PROTOCOL: https
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
name: Build (${{ matrix.os }}/${{ matrix.arch }})
|
name: Build (${{ matrix.os }}/${{ matrix.arch }})
|
||||||
|
|
@ -38,12 +42,11 @@ jobs:
|
||||||
FORGEJO_TOKEN: ${{ secrets.FORGEJO_TOKEN }}
|
FORGEJO_TOKEN: ${{ secrets.FORGEJO_TOKEN }}
|
||||||
run: |
|
run: |
|
||||||
set -euo pipefail
|
set -euo pipefail
|
||||||
HOST=${GITHUB_SERVER_URL#http://}
|
git clone "${FORGEJO_PROTOCOL}://x-access-token:${FORGEJO_TOKEN}@${FORGEJO_HOST}/${GITHUB_REPOSITORY}.git" .
|
||||||
git clone "http://x-access-token:${FORGEJO_TOKEN}@${HOST}/${GITHUB_REPOSITORY}.git" .
|
|
||||||
git checkout "$GITHUB_SHA"
|
git checkout "$GITHUB_SHA"
|
||||||
|
|
||||||
- name: Setup Go
|
- name: Setup Go
|
||||||
uses: https://code.forgejo.org/actions/setup-go@v5
|
uses: https://code.forgejo.org/actions/setup-go@v7
|
||||||
with:
|
with:
|
||||||
go-version: '1.26'
|
go-version: '1.26'
|
||||||
|
|
||||||
|
|
@ -94,7 +97,7 @@ jobs:
|
||||||
- name: Create Forgejo release
|
- name: Create Forgejo release
|
||||||
uses: https://code.forgejo.org/actions/forgejo-release@v2
|
uses: https://code.forgejo.org/actions/forgejo-release@v2
|
||||||
with:
|
with:
|
||||||
url: ${{ github.server_url }}
|
url: ${{ env.FORGEJO_PROTOCOL }}://${{ env.FORGEJO_HOST }}
|
||||||
token: ${{ secrets.FORGEJO_TOKEN }}
|
token: ${{ secrets.FORGEJO_TOKEN }}
|
||||||
tag: ${{ github.ref_name }}
|
tag: ${{ github.ref_name }}
|
||||||
release-dir: release
|
release-dir: release
|
||||||
|
|
|
||||||
2
.github/workflows/bump-version.yml
vendored
2
.github/workflows/bump-version.yml
vendored
|
|
@ -17,7 +17,7 @@ jobs:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v5
|
||||||
with:
|
with:
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
token: ${{ secrets.GITHUB_TOKEN }}
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
|
|
||||||
4
.github/workflows/release.yml
vendored
4
.github/workflows/release.yml
vendored
|
|
@ -37,12 +37,12 @@ jobs:
|
||||||
ext: '.exe'
|
ext: '.exe'
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v5
|
||||||
with:
|
with:
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
|
|
||||||
- name: Setup Go
|
- name: Setup Go
|
||||||
uses: actions/setup-go@v5
|
uses: actions/setup-go@v7
|
||||||
with:
|
with:
|
||||||
go-version: '1.26'
|
go-version: '1.26'
|
||||||
cache: true
|
cache: true
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue