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 bef038a
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 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: [approve, unittest]
runs-on: ubuntu-latest
outputs:
INSTANCE_ID: ${{ steps.terraform_instance_id.outputs.INSTANCE_ID }}
Expand Down Expand Up @@ -113,7 +113,7 @@ jobs:

integration:
name: integration
needs: [ unittest, terraform_apply, approve ]
needs: [approve, unittest, terraform_apply]
runs-on: ubuntu-latest
strategy:
max-parallel: 1
Expand Down Expand Up @@ -186,7 +186,7 @@ jobs:
terraform_destroy:
name: terraform_destroy
needs: [unittest, terraform_apply, integration, approve]
needs: [approve, unittest, terraform_apply, integration]
if: success() || failure()
runs-on: ubuntu-latest
steps:
Expand Down Expand Up @@ -228,7 +228,7 @@ jobs:
e2e:
name: e2e
needs: [ unittest, terraform_apply, integration, approve ]
needs: [approve, unittest, terraform_apply, integration]
runs-on: ubuntu-latest
strategy:
matrix:
Expand Down

0 comments on commit bef038a

Please sign in to comment.