From 6e3e0aaee070db6181b774a0bb58fee18b930424 Mon Sep 17 00:00:00 2001 From: Graeme Porteous Date: Fri, 3 Nov 2023 12:17:36 +0000 Subject: [PATCH] Update CI GitHub workflow Ensure push events still work. After the changes in 053f8b1 the workflow errored. --- .github/workflows/ci.yml | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index b11da8cec9..846586100a 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -29,13 +29,15 @@ jobs: - name: Check for [skip rspec] id: skip run: | - PR_DESCRIPTION=$(gh pr view https://github.com/${{ github.repository }}/pull/${{ github.event.pull_request.number }} --json body -q '.body') - if echo "$PR_DESCRIPTION" | grep -q "\[skip rspec\]"; then - echo "Skip RSpec found in PR description. Passing the action." - echo "skip_rspec=true" >> $GITHUB_OUTPUT - else - echo "skip_rspec=false" >> $GITHUB_OUTPUT + if [ "${{ github.event_name }}" = "pull_request" ]; then + PR_DESCRIPTION=$(gh pr view https://github.com/${{ github.repository }}/pull/${{ github.event.pull_request.number }} --json body -q '.body') + if echo "$PR_DESCRIPTION" | grep -q "\[skip rspec\]"; then + echo "Skip RSpec found in PR description. Passing the action." + echo "skip_rspec=true" >> $GITHUB_OUTPUT + exit + fi fi + echo "skip_rspec=false" >> $GITHUB_OUTPUT rspec: name: Ruby ${{ matrix.ruby }} / PostgreSQL ${{ matrix.postgres }}