File tree Expand file tree Collapse file tree 2 files changed +10
-4
lines changed
Expand file tree Collapse file tree 2 files changed +10
-4
lines changed Original file line number Diff line number Diff line change @@ -4,7 +4,7 @@ set -eo pipefail
44
55readonly API_BASE=" https://api.github.com/repos/LLNL/zfp"
66readonly TOKEN=" ${CI_GITHUB_ROBOT_TOKEN} "
7- readonly COMMIT=" ${GITHUB_WORKFLOW_SHA } "
7+ readonly COMMIT=" ${COMMIT_SHA } "
88readonly CDASH_STATUS_CONTEXT=" cdash"
99
1010# ==============================================================================
@@ -26,7 +26,7 @@ command -v curl &> /dev/null || { echo "jq not found"; exit 1; }
2626command -v jq & > /dev/null || { echo " jq not found" ; exit 2; }
2727
2828[ -z " ${CI_GITHUB_ROBOT_TOKEN} " ] && { echo " CI_GITHUB_ROBOT_TOKEN env variable empty" ; exit 3; }
29- [ -z " ${GITHUB_WORKFLOW_SHA } " ] && { echo " GITHUB_WORKFLOW_SHA env variable empty" ; exit 4; }
29+ [ -z " ${COMMIT_SHA } " ] && { echo " COMMIT_SHA env variable empty" ; exit 4; }
3030
3131# ==============================================================================
3232
Original file line number Diff line number Diff line change @@ -7,9 +7,15 @@ permissions: write-all
77
88jobs :
99 generate_statuses :
10+ env :
11+ CI_GITHUB_ROBOT_TOKEN : ${{ secrets.CI_GITHUB_ROBOT_TOKEN }}
1012 runs-on : ubuntu-latest
1113 steps :
1214 - uses : actions/checkout@v4
15+ - if : ${{ github.event_name == 'pull_request_target' }}
16+ run : echo "COMMIT_SHA=${{ github.event.pull_request.head.sha }}" >> "${GITHUB_ENV}"
17+
18+ - if : ${{ github.event_name == 'push' }}
19+ run : echo "COMMIT_SHA=${{ github.sha }}" >> "${GITHUB_ENV}"
20+
1321 - run : .github/post-cdash-status
14- env :
15- CI_GITHUB_ROBOT_TOKEN : ${{ secrets.CI_GITHUB_ROBOT_TOKEN }}
You can’t perform that action at this time.
0 commit comments