From d16dee4dd5f0f5b9542dcaf74e60eb73f7366fca Mon Sep 17 00:00:00 2001 From: edde746 <86283021+edde746@users.noreply.github.com> Date: Fri, 6 Feb 2026 14:11:47 +0100 Subject: [PATCH] fix: homebrew cask job --- .github/workflows/update-cask.yml | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/.github/workflows/update-cask.yml b/.github/workflows/update-cask.yml index 14568e55..9e2b5af5 100644 --- a/.github/workflows/update-cask.yml +++ b/.github/workflows/update-cask.yml @@ -12,6 +12,9 @@ jobs: contents: write steps: - uses: actions/checkout@v4 + with: + ref: ${{ github.event.repository.default_branch }} + fetch-depth: 0 - name: Download and hash release id: release @@ -30,8 +33,13 @@ jobs: - name: Commit run: | + BRANCH="${{ github.event.repository.default_branch }}" git config user.name "github-actions[bot]" git config user.email "github-actions[bot]@users.noreply.github.com" git add Casks/plezy.rb - git diff --staged --quiet || git commit -m "chore: update cask to ${{ steps.release.outputs.version }}" - git push + if ! git diff --staged --quiet; then + git commit -m "chore: update cask to ${{ steps.release.outputs.version }}" + git push origin "HEAD:$BRANCH" + else + echo "No cask changes to commit." + fi