GHA: enclose if expressions in ${{ }} where missing

Enclosing expressions in `${{ }}` is optional, but sometimes required.
It seems more straighforward to use it always rather than decide on
a case-by-case basis. Before this patch 71 `if`s were enclosed and 49
were not. Enclosing these makes it easy to grep and recognize these
whereever used.

https://docs.github.com/actions/writing-workflows/choosing-when-your-workflow-runs/using-conditions-to-control-job-execution

Closes #17550
This commit is contained in:
Viktor Szakats 2025-06-06 23:29:22 +02:00
parent 5f805eec11
commit 128c5ddc6b
No known key found for this signature in database
GPG key ID: B5ABD165E2AEF201
5 changed files with 54 additions and 55 deletions

View file

@ -40,7 +40,7 @@ jobs:
gh repo view --json repositoryTopics --jq '.repositoryTopics[].name' | grep '^hacktoberfest$')" >> "$GITHUB_OUTPUT"
- name: Search relevant commit message lines starting with Closes/Merges
if: steps.check.outputs.label == 'hacktoberfest'
if: ${{ steps.check.outputs.label == 'hacktoberfest' }}
env:
GITHUB_EVENT_BEFORE: '${{ github.event.before }}'
GITHUB_EVENT_AFTER: '${{ github.event.after }}'
@ -49,7 +49,7 @@ jobs:
grep -Ei '^Close[sd]? ' | sort | uniq | tee log
- name: Search for Number-based PR references
if: steps.check.outputs.label == 'hacktoberfest'
if: ${{ steps.check.outputs.label == 'hacktoberfest' }}
env:
GITHUB_TOKEN: '${{ secrets.GITHUB_TOKEN }}'
run: |
@ -60,7 +60,7 @@ jobs:
gh pr edit {} --add-label 'hacktoberfest-accepted'
- name: Search for URL-based PR references
if: steps.check.outputs.label == 'hacktoberfest'
if: ${{ steps.check.outputs.label == 'hacktoberfest' }}
env:
GITHUB_TOKEN: '${{ secrets.GITHUB_TOKEN }}'
run: |