File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -97,10 +97,15 @@ jobs:
9797 - name : Watch the deployment
9898 run : gh run watch $deploy_run_id -R originlab/${{ matrix.site }} -i 10 --exit-status
9999
100- - name : Set $build_job_id and $optimize_job_id
100+ - name : Find job IDs and the SHA
101101 run : |
102- echo "build_job_id=$(gh run view $deploy_run_id -R originlab/${{ matrix.site }} | grep 'publish_book / convert' | grep -oP '\(ID \K\d+')" >> "$GITHUB_ENV"
103- echo "optimize_job_id=$(gh run view $deploy_run_id -R originlab/${{ matrix.site }} | grep 'publish_book / optimize' | grep -oP '\(ID \K\d+')" >> "$GITHUB_ENV"
102+ run_view_json=$(gh run view "$deploy_run_id" -R "originlab/${{ matrix.site }}" --json jobs,headSha)
103+
104+ echo "$run_view_json"
105+
106+ echo "build_job_id=$(echo "$run_view_json" | jq -r '.jobs[] | select(.name == "publish_book / convert") | .id')" >> "$GITHUB_ENV"
107+ echo "optimize_job_id=$(echo "$run_view_json" | jq -r '.jobs[] | select(.name == "publish_book / optimize") | .id')" >> "$GITHUB_ENV"
108+ echo "run_sha=$(echo "$run_view_json" | jq -r '.headSha')" >> "$GITHUB_ENV"
104109
105110 - name : Setup helper scripts
106111 run : |
You can’t perform that action at this time.
0 commit comments