Skip to content

Commit

Permalink
Fix conditional step
Browse files Browse the repository at this point in the history
  • Loading branch information
yhna940 committed Dec 1, 2022
1 parent 1b4ae6d commit 2aa6f73
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 19 deletions.
19 changes: 10 additions & 9 deletions .github/workflows/build_unit_test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,26 +7,27 @@ on:
paths-ignore:
- ".github/**.md"
- "README.md"
types:
- opened
- synchronize
- reopened
- ready_for_review

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
fail_if_pull_request_is_draft:
if: github.event.pull_request.draft == true
runs-on: ubuntu-latest
timeout-minutes: 120

steps:
- name: Fails in order to indicate that pull request needs to be marked as ready to review and unit tests workflow needs to pass.
run: exit 1

unit_test:
runs-on: ubuntu-latest
timeout-minutes: 120

steps:
- name: Fail if draft
if: github.event.pull_request.draft == true
run:
exit 1

- name: checkout
uses: actions/checkout@v2

Expand Down
11 changes: 1 addition & 10 deletions .github/workflows/build_unit_test_pass.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,18 +13,9 @@ concurrency:
cancel-in-progress: true

jobs:
fail_if_pull_request_is_draft:
if: github.event.pull_request.draft == true
runs-on: ubuntu-latest
timeout-minutes: 120

steps:
- name: Fails in order to indicate that pull request needs to be marked as ready to review and unit tests workflow needs to pass.
run: exit 1

unit_test:
runs-on: ubuntu-latest
timeout-minutes: 20

steps:
- run: 'echo "No build required" '
- run: 'echo "No build required" '

0 comments on commit 2aa6f73

Please sign in to comment.