Skip to content

Commit 89a12cd

Browse files
committed
ci: fix logic for running checks
1 parent 3794d15 commit 89a12cd

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

.github/workflows/ci.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -165,11 +165,14 @@ jobs:
165165
name: Check job status
166166
runs-on: ubuntu-latest
167167
# run the checks if we're either 1) not a PR or 2) a PR but the head commit doesn't say to skip
168-
if: ${{ !startsWith(github.ref_name, 'pull-request/') || !contains(github.event.push.head_commit.message, '[skip ci]') }}
169168
permissions:
170169
checks: read
171170
steps:
171+
- name: Get PR title
172+
id: get-pr-title
173+
run: echo "pr_title=$(gh pr view "$(grep -Po '(\d+)$' <<< '${{ github.ref_name }}')" --json title --jq '.title')" >> "$GITHUB_OUTPUT"
172174
- name: GitHub Checks
175+
if: ${{ !contains(steps.get-pr-title.outputs.pr_title, '[skip ci]') }}
173176
uses: poseidon/wait-for-status-checks@899c768d191b56eef585c18f8558da19e1f3e707 # v0.6.0
174177
with:
175178
token: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)