Skip to content

Commit

Permalink
Run CI only when PR is not in draft status (#194)
Browse files Browse the repository at this point in the history
* add sr deprecated message

* run ci test when status is not draft
  • Loading branch information
doombeaker authored Oct 30, 2024
1 parent 71a88ee commit 035258f
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion .github/workflows/workflow-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ on:
pull_request:
branches:
- master
types: [opened, synchronize, reopened]

concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number }}
Expand Down Expand Up @@ -42,13 +43,24 @@ jobs:

run-examples-workflows:
needs: check-modified-files
if: ${{ needs.check-modified-files.outputs.only_non_code_files == 'false' }}
if: ${{ needs.check-modified-files.outputs.only_non_code_files == 'false' && github.event.pull_request.draft == false }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [windows-latest, ubuntu-latest]

steps:
- name: Check if PR is draft
id: check_draft
run: |
if [ "$GITHUB_EVENT_NAME" = "pull_request" ] && [ "$GITHUB_EVENT_PULL_REQUEST_DRAFT" = "true" ]; then
echo "PR is draft, skipping CI"
echo "::set-output name=skip::true"
else
echo "PR is not draft, running CI"
echo "::set-output name=skip::false"
fi
- name: Show Base
run: |
echo "Current directory: $(pwd)"
Expand Down

0 comments on commit 035258f

Please sign in to comment.