From a2ecc6c4534c50c68f39411d1efb0e1facd8089e Mon Sep 17 00:00:00 2001 From: Lukasz Raczylo Date: Mon, 30 Nov 2026 07:12:35 +0000 Subject: [PATCH] fix(release): serialise chart releases so the gh-pages push does not race (#1) Two repository_dispatch releases pushed gh-pages together; the second was rejected with 'cannot lock ref ... expected ...'. Add a concurrency group and rebase before the push. --- .github/workflows/release-chart.yaml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/.github/workflows/release-chart.yaml b/.github/workflows/release-chart.yaml index a8e50ec..75244c0 100644 --- a/.github/workflows/release-chart.yaml +++ b/.github/workflows/release-chart.yaml @@ -25,6 +25,12 @@ on: permissions: contents: write +# Two chart releases used to push gh-pages at the same time and the second +# lost the ref lock. Serialise them; the checkout then sees the previous push. +concurrency: + group: release-chart-gh-pages + cancel-in-progress: false + jobs: release: runs-on: ubuntu-latest @@ -196,4 +202,5 @@ jobs: # Only add specific paths, not source-repo git add charts/ index.yaml README.md git diff --staged --quiet || git commit -m "Release ${{ steps.inputs.outputs.chart_name }} ${{ steps.inputs.outputs.version }}" + git pull --rebase origin gh-pages git push origin gh-pages