Fetch the commit archive in CI instead of using git clone
Lua tests / test (push) Successful in 14s

The Gitea server currently corrupts clone/fetch pack responses with
"protocol error: bad pack header" (reproducible with a plain git clone),
which makes actions/checkout fail before any of our steps run. Download
the commit archive via the API instead (with a token, falling back to
anonymous for public repos) and extract it into the workspace.
This commit is contained in:
dfj committed 2026-10-24 16:00:07 +02:00
1 parent 1fda0d3817
commit 9d809309ac
1 file changed
+12 -2
+12 -2
View File
@@ -11,8 +11,18 @@ jobs:
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- name: Check out repository
uses: actions/checkout@v4
# The server currently corrupts git clone/fetch pack responses
# ("fatal: protocol error: bad pack header"), which breaks
# actions/checkout, so fetch the commit archive from the API instead.
- name: Fetch source archive
env:
TOKEN: ${{ secrets.GITEA_TOKEN }}
URL: ${{ gitea.server_url }}/api/v1/repos/${{ gitea.repository }}/archive/${{ gitea.sha }}.tar.gz
run: |
if ! curl -fsSL -H "Authorization: token $TOKEN" -o "$RUNNER_TEMP/source.tar.gz" "$URL"; then
curl -fsSL -o "$RUNNER_TEMP/source.tar.gz" "$URL"
fi
tar -xzf "$RUNNER_TEMP/source.tar.gz" -C "$GITHUB_WORKSPACE" --strip-components=1
- name: Install Lua 5.4
run: |