Skip to content

Commit

Permalink
Testing grep
Browse files Browse the repository at this point in the history
  • Loading branch information
nbhoski committed May 16, 2024
1 parent 4851124 commit 8c149e8
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions .github/workflows/bat.yml
Original file line number Diff line number Diff line change
Expand Up @@ -172,11 +172,17 @@ jobs:
rm buildlog.txt
- name: Verify grep
run: |
set -e
gh run view ${{ github.run_id }} --log | grep "##[group]build - deploy"
env:
GITHUB_TOKEN: ${{ github.token }}
run: |
URL="https://api.github.com/repos/${GITHUB_REPOSITORY}/actions/runs/${GITHUB_RUN_ID}/jobs"
AUTH_HEADER="Authorization: token ${GITHUB_TOKEN}"
ACCEPT_HEADER="Accept: application/vnd.github.v3+json"
# Fetch job details and parse the JOB_ID
JOB_ID=$(curl -s -H "${AUTH_HEADER}" -H "${ACCEPT_HEADER}" "${URL}" | jq --arg JOB_NAME "$JOB_NAME" '.jobs[] | select(.name==$JOB_NAME) | .id')
echo "JOB_ID: $JOB_ID"

0 comments on commit 8c149e8

Please sign in to comment.