generated from n3tuk/template-terraform-configuration
-
Notifications
You must be signed in to change notification settings - Fork 0
42 lines (38 loc) · 1.1 KB
/
terraform-trigger-label.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
---
name: Label
on:
pull_request:
types:
- labeled
branches:
- main
permissions:
id-token: write
contents: write
issues: write
checks: write
pull-requests: write
jobs:
remove-force-integrations-label:
name: Remove Label
runs-on: ubuntu-latest
if: ${{ github.event.label.name == 'force-integrations-run' }}
steps:
- name: Remove the force-integrations-run Label
uses: actions/github-script@v7
with:
script: |
github.rest.issues.removeLabel({
issue_number: context.payload.pull_request.number,
owner: context.repo.owner,
repo: context.repo.repo,
name: ['force-integrations-run']
})
terraform-integrations:
# This job name must match the name of call called Workflow in order for
# the name to successfully match any required status checks within the
# branch protections
name: Terraform Integrations
if: ${{ github.event.label.name == 'force-integrations-run' }}
uses: ./.github/workflows/terraform-integrations.yaml
secrets: inherit