Skip to content

Commit

Permalink
build(gha): fix syntax error in artifact flow
Browse files Browse the repository at this point in the history
  • Loading branch information
EdieLemoine committed Mar 14, 2024
1 parent d3b1aaa commit fd66837
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions .github/workflows/pull-request-completed.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,11 @@ jobs:
REPO: ${{ github.event.repository.name }}
#language=sh
run: |
ARTIFACT_ID=$(gh api "/repos/$OWNER/$REPO/actions/artifacts" \
--jq ".artifacts.[] | select(.workflow_run.id==${PREVIOUS_JOB_ID}) | select(.expired==false) | .id")
HEAD_SHA=$(jq -r '.pull_requests[0].head.sha' <<< "$WORKFLOW_RUN_EVENT_OBJ")
PREVIOUS_JOB_ID=$(jq -r '.id' <<< "$WORKFLOW_RUN_EVENT_OBJ")
PR_NUMBER=$(jq -r '.pull_requests[0].number' <<< "$WORKFLOW_RUN_EVENT_OBJ")
SUITE_ID=$(jq -r '.check_suite_id' <<< "$WORKFLOW_RUN_EVENT_OBJ")
ARTIFACT_ID=$(gh api "/repos/$OWNER/$REPO/actions/artifacts" --jq ".artifacts.[] | select(.workflow_run.id==${PREVIOUS_JOB_ID}) | select(.expired==false) | .id")
echo "artifact-id=$ARTIFACT_ID" >> $GITHUB_OUTPUT
echo "head-sha=$HEAD_SHA" >> $GITHUB_OUTPUT
Expand Down

0 comments on commit fd66837

Please sign in to comment.