Skip to content

Commit

Permalink
Moved the if condition to approve job
Browse files Browse the repository at this point in the history
  • Loading branch information
athiruma committed Jul 23, 2024
1 parent 9ef15e2 commit d71ea4a
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/PR.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ concurrency:

jobs:
approve: # First step
# minimize potential vulnerabilities
if: ${{ contains(github.event.pull_request.labels.*.name, 'ok-to-test') }}
runs-on: ubuntu-latest
steps:
- name: Approve
Expand All @@ -25,8 +27,6 @@ jobs:
strategy:
matrix:
python-version: [ '3.8', '3.9', '3.10', '3.11', '3.12' ]
# minimize potential vulnerabilities
if: ${{ contains(github.event.pull_request.labels.*.name, 'ok-to-test') }}
steps:
- uses: actions/checkout@v4
with:
Expand Down Expand Up @@ -65,7 +65,7 @@ jobs:
terraform_apply:
name: terraform_apply
needs: [unittest, approve]
needs: [ unittest, approve]
runs-on: ubuntu-latest
outputs:
INSTANCE_ID: ${{ steps.terraform_instance_id.outputs.INSTANCE_ID }}
Expand Down Expand Up @@ -186,7 +186,7 @@ jobs:
terraform_destroy:
name: terraform_destroy
needs: [unittest, terraform_apply, integration, approve]
needs: [ unittest, terraform_apply, integration, approve]
if: success() || failure()
runs-on: ubuntu-latest
steps:
Expand Down

0 comments on commit d71ea4a

Please sign in to comment.