From ee6dd9b9a566f029f219dbb124728545d0f2a524 Mon Sep 17 00:00:00 2001 From: g8row Date: Sun, 20 Sep 2026 19:14:15 +0300 Subject: [PATCH] Let the source feed update itself when a release is published MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The workflow has only ever worked from a manual run. On a release event `actions/checkout` takes the tag, so the job built `docs/apps.json`, committed it, and then could not push it: "fatal: You are not currently on a branch". Publishing 0.3.7 hit exactly that, leaving the feed pointing at 0.3.6 with the release already out. It now checks out the default branch, which is where the commit belongs — the feed is rebuilt from the GitHub API, never from the tree — and pushes there explicitly. Co-Authored-By: Claude Opus 5 --- .github/workflows/source.yml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/.github/workflows/source.yml b/.github/workflows/source.yml index b365c98..eaaacf3 100644 --- a/.github/workflows/source.yml +++ b/.github/workflows/source.yml @@ -20,7 +20,12 @@ jobs: build: runs-on: ubuntu-latest steps: + # The feed is rebuilt from the GitHub API, not from the tree, and the + # commit below belongs on the default branch. A release event otherwise + # checks out the tag, leaving a detached HEAD that `git push` refuses. - uses: actions/checkout@v5 + with: + ref: ${{ github.event.repository.default_branch }} - name: Resolve source repository id: src @@ -115,5 +120,5 @@ jobs: echo "No change." else git commit -m "source: update apps.json" - git push + git push origin "HEAD:${{ github.event.repository.default_branch }}" fi