fix(ci): use env vars for input interpolation in workflow run steps (#26520)

Co-authored-by: Alex van Andel <me@alexvanandel.com>
This commit is contained in:
Pedro Castro
2026-01-06 22:56:59 +00:00
committed by GitHub
co-authored by Alex van Andel
parent b8b9251f76
commit 0df161ef26
3 changed files with 17 additions and 7 deletions
+3 -2
View File
@@ -34,12 +34,13 @@ jobs:
- name: Cleanup HTML reports on PR close/merge
env:
BRANCH_REPORTS_DIR: reports/${{ github.event.pull_request.head.ref }}
HEAD_REF: ${{ github.event.pull_request.head.ref }}
run: |
if [ -d "$BRANCH_REPORTS_DIR" ]; then
rm -rf "$BRANCH_REPORTS_DIR"
git add .
git commit -m "workflow: remove all reports for branch ${{ github.event.pull_request.head.ref }} (PR closed/merged)"
git commit -m "workflow: remove all reports for branch $HEAD_REF (PR closed/merged)"
git push
else
echo "No reports found for branch ${{ github.event.pull_request.head.ref }}. Nothing to clean up."
echo "No reports found for branch $HEAD_REF. Nothing to clean up."
fi
+6 -2
View File
@@ -56,14 +56,18 @@ jobs:
- uses: ./.github/actions/yarn-install
- name: Bump version
env:
VERSION: ${{ inputs.next_version }}
run: |
cd apps/web
yarn version ${{ inputs.next_version }}
yarn version "$VERSION"
- name: Commit changes
env:
VERSION: ${{ inputs.next_version }}
run: |
git add .
git commit -m "chore: release v${{ inputs.next_version }}"
git commit -m "chore: release v$VERSION"
git push
- name: Draft release
+8 -3
View File
@@ -63,10 +63,12 @@ jobs:
- name: Cleanup old HTML reports
if: ${{ env.BRANCH_REPORTS_EXIST == 'true' }}
timeout-minutes: 3
env:
HEAD_BRANCH: ${{ inputs.head_branch }}
run: |
rm -rf $BRANCH_REPORTS_DIR
rm -rf "$BRANCH_REPORTS_DIR"
git add .
git commit -m "workflow: remove all reports for branch ${{ inputs.head_branch }}"
git commit -m "workflow: remove all reports for branch $HEAD_BRANCH"
- name: Download zipped HTML report
uses: actions/download-artifact@v4
with:
@@ -76,9 +78,12 @@ jobs:
timeout-minutes: 3
# commit report, then try push-rebase-loop until it's able to merge the HTML report to the gh-pages branch
# this is necessary when this job running at least twice at the same time (e.g. through two pushes at the same time)
env:
RUN_ID: ${{ inputs.source_run_id }}
RUN_ATTEMPT: ${{ inputs.source_run_attempt }}
run: |
git add .
git commit -m "workflow: add HTML report for run-id ${{ inputs.source_run_id }} (attempt: ${{ inputs.source_run_attempt }})"
git commit -m "workflow: add HTML report for run-id $RUN_ID (attempt: $RUN_ATTEMPT)"
while true; do
git pull --rebase