Skip to content

Commit 720fd84

Browse files
authored
fix checks in ci (#1134)
1 parent 682f3c0 commit 720fd84

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

.github/workflows/build.yml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -45,14 +45,16 @@ jobs:
4545
steps:
4646
- name: Checkout code
4747
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
48+
with:
49+
# Checkout the PR head commit to get the commit message first
50+
ref: ${{ github.event.pull_request.head.sha }}
4851
- name: Check if static only
4952
uses: ./.github/actions/tests/skip_on_static
5053
id: static_only
5154
- name: Cancel if not opted in
5255
shell: bash
5356
run: |
54-
git fetch origin ${{ github.event.pull_request.head.sha }}
55-
last_commit_msg=$(git log -1 --pretty=%B ${{ github.event.pull_request.head.sha }})
57+
last_commit_msg=$(git log -1 --pretty=%B)
5658
echo "Last commit message: $last_commit_msg"
5759
if [[ $last_commit_msg != *"[ci]"* ]] && [[ "${{ steps.static_only.outputs.skip }}" == "false" ]] ; then
5860
echo "Cancelling the entire workflow because the current commit does not opt in for CI."
@@ -280,7 +282,6 @@ jobs:
280282
final_result:
281283
if: ${{ always() && (github.event_name == 'pull_request' || github.event_name == 'pull_request_target') }}
282284
needs:
283-
- cancel_if_not_opt_in
284285
- static_tests
285286
- deployment_test
286287
- daml_test
@@ -323,7 +324,7 @@ jobs:
323324
# shellcheck disable=SC2129
324325
echo "FORCE=false" >> "$GITHUB_ENV"
325326
echo "JOBS<<EOF" >> "$GITHUB_ENV"
326-
echo '${{ toJSON(needs) }}' | jq '{"cancel_if_not_opt_in", "docs", "static_tests", "deployment_test"}' >> "$GITHUB_ENV"
327+
echo '${{ toJSON(needs) }}' | jq '{"docs", "static_tests", "deployment_test"}' >> "$GITHUB_ENV"
327328
echo "EOF" >> "$GITHUB_ENV"
328329
else
329330
echo "Checking if all jobs succeeded."

0 commit comments

Comments
 (0)