Skip to content

Commit ecabc0b

Browse files
committed
fix(ci): avoid secrets in workflow conditionals
1 parent 4b99200 commit ecabc0b

1 file changed

Lines changed: 10 additions & 2 deletions

File tree

.github/workflows/release.yml

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,20 +62,28 @@ jobs:
6262
name: Update Homebrew tap
6363
runs-on: ubuntu-24.04
6464
needs: package
65-
if: ${{ secrets.HOMEBREW_TAP_TOKEN != '' }}
65+
env:
66+
HOMEBREW_TAP_TOKEN: ${{ secrets.HOMEBREW_TAP_TOKEN }}
6667
steps:
68+
- name: Skip when tap token is unavailable
69+
if: ${{ env.HOMEBREW_TAP_TOKEN == '' }}
70+
run: echo "HOMEBREW_TAP_TOKEN is not configured; skipping tap update."
71+
6772
- name: Check out tap repository
73+
if: ${{ env.HOMEBREW_TAP_TOKEN != '' }}
6874
uses: actions/checkout@v4
6975
with:
7076
repository: oops-rs/homebrew-tap
7177
ref: main
72-
token: ${{ secrets.HOMEBREW_TAP_TOKEN }}
78+
token: ${{ env.HOMEBREW_TAP_TOKEN }}
7379
path: tap
7480

7581
- name: Update grapha formula
82+
if: ${{ env.HOMEBREW_TAP_TOKEN != '' }}
7683
run: bash tap/scripts/update-formula.sh grapha "${{ github.event.release.tag_name }}"
7784

7885
- name: Commit updated formula
86+
if: ${{ env.HOMEBREW_TAP_TOKEN != '' }}
7987
run: |
8088
if git -C tap diff --quiet -- Formula; then
8189
echo "grapha formula already up to date"

0 commit comments

Comments
 (0)