Skip to content

Commit feabf67

Browse files
committed
ci: conditionally set environment for terratest jobs based on actor and fork status
**Changed:** - Updated environment assignment for 'net' and 'instance-factory' jobs to set the environment to empty when the actor is 'l50' and the PR is not from a fork, otherwise use 'terratest' - .github/workflows/terratest.yaml
1 parent ba491ad commit feabf67

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

.github/workflows/terratest.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ jobs:
104104
needs: [detect-changes, semaphore]
105105
if: needs.detect-changes.outputs.net == 'true'
106106
runs-on: ubuntu-latest
107-
environment: terratest
107+
environment: ${{ (github.actor == 'l50' && github.event.pull_request.head.repo.fork != true) && '' || 'terratest' }}
108108
permissions:
109109
id-token: write
110110
contents: read
@@ -171,7 +171,7 @@ jobs:
171171
needs: [detect-changes, semaphore]
172172
if: needs.detect-changes.outputs.instance-factory == 'true'
173173
runs-on: ubuntu-latest
174-
environment: terratest
174+
environment: ${{ (github.actor == 'l50' && github.event.pull_request.head.repo.fork != true) && '' || 'terratest' }}
175175
permissions:
176176
id-token: write
177177
contents: read

0 commit comments

Comments
 (0)