forked from bcgov/nr-bcws-opensearch
-
Notifications
You must be signed in to change notification settings - Fork 2
49 lines (41 loc) · 1.58 KB
/
deploy_dlv.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
40
41
42
43
44
45
46
47
48
49
# This workflow deploys the code tagged with 'deploy-dlv*'
name: deploy_dlv
# Controls when the action will run.
on:
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
tags: [deploy-dlv*]
env:
TF_VERSION: 1.1.0
TG_VERSION: 0.29.2
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# This workflow contains a single job called "deploy"
deploy:
# The type of runner that the job will run on
runs-on: ubuntu-latest
# Production GitHub repo environment
environment:
name: dlv
env:
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v2
with:
ref: ${{ github.event.workflow_run.head_branch }}
# Install the latest version of Terraform CLI and configure the Terraform CLI configuration file with a Terraform Cloud user API token
- name: Setup Terraform
uses: hashicorp/setup-terraform@v1
with:
cli_config_credentials_token: ${{ secrets.TF_API_TOKEN }}
# Install/Setup terragrunt CLI
- uses: peter-murray/[email protected]
with:
terragrunt_version: ${{ env.TG_VERSION }}
# Apply changes
- name: Terragrunt Apply
working-directory: terragrunt/DLV
env:
app_image: ${{ env.IMAGE_ID }}:${{ github.event.workflow_run.head_branch}}
run: terragrunt run-all apply --terragrunt-non-interactive