Skip to content

Commit 8aedbd7

Browse files
Refactor Github Action per b/485167538
1 parent 68e6b1b commit 8aedbd7

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

.github/workflows/apply-auto-fixes.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,14 +27,16 @@ jobs:
2727
# Use the GitHub API to check if the 'auto-fixes-patch' artifact exists for the triggering workflow run.
2828
# The artifacts_url is a pre-authenticated API endpoint.
2929
# We use jq to parse the JSON response and see if our artifact is in the list.
30-
artifact_json=$(curl -s "${{ github.event.workflow_run.artifacts_url }}")
30+
artifact_json=$(curl -s "${GITHUB_EVENT_WORKFLOW_RUN_ARTIFACTS_URL}")
3131
if echo "$artifact_json" | jq -e '.artifacts[] | select(.name == "auto-fixes-patch")' > /dev/null; then
3232
echo "Patch artifact found."
3333
echo "exists=true" >> $GITHUB_OUTPUT
3434
else
3535
echo "No patch artifact was uploaded."
3636
echo "exists=false" >> $GITHUB_OUTPUT
3737
fi
38+
env:
39+
GITHUB_EVENT_WORKFLOW_RUN_ARTIFACTS_URL: ${{ github.event.workflow_run.artifacts_url }}
3840

3941
- name: Checkout PR branch
4042
if: steps.check_artifact.outputs.exists == 'true'

0 commit comments

Comments
 (0)