-
Notifications
You must be signed in to change notification settings - Fork 1
39 lines (36 loc) · 1.11 KB
/
terraform_on_pr.yml
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
name: 'Terraform: verifications'
run-name: "Verifying Terraform code [PR-${{github.event.pull_request.number}}][SHA: ${{ github.event.pull_request.head.sha}}]"
on:
pull_request:
branches:
- develop
- main
paths:
- '**.tf'
jobs:
terraform-steps:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
environment: ['stage']
steps:
- name: Fetch repository
uses: actions/checkout@v3
- name: Configure required access
uses: ./.github/actions/setup-creds
with:
github: ${{ secrets.GH_TOKEN }}
gcloud: ${{ secrets.GCS_JSON }}
- name: Test action
uses: SolalVall/action-terraform@main
with:
artifact_workflow: false
directory: terraform/${{ matrix.environment }}
tf_version: 1.4.6
tf_init: true
tf_lint: true
tf_plan: true
env:
DYNATRACE_ENV_URL: ${{ secrets[format('DYNATRACE_{0}_ENV_URL', matrix.environment)] }}
DYNATRACE_API_TOKEN: ${{ secrets[format('DYNATRACE_{0}_API_TOKEN', matrix.environment)] }}