diff --git a/.forgejo/workflows/build_release.yml b/.forgejo/workflows/build_release.yml index 0fa449679..e5c1a43c0 100755 --- a/.forgejo/workflows/build_release.yml +++ b/.forgejo/workflows/build_release.yml @@ -18,9 +18,16 @@ jobs: runs-on: forgejo-release steps: - name: Clone repository - uses: actions/checkout@v4 # Forgejo-compatible (node20) - with: - fetch-depth: 0 + shell: bash + env: + FORGEJO_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: | + set -euo pipefail + rm -rf .git + git init . + git remote add origin "http://copilot:${FORGEJO_TOKEN}@127.0.0.1:3030/${GITHUB_REPOSITORY}.git" + git fetch --tags --prune --depth=1 origin "${GITHUB_SHA}" + git checkout --force FETCH_HEAD - name: Set up JDK shell: bash