-
Notifications
You must be signed in to change notification settings - Fork 0
49 lines (42 loc) · 1.55 KB
/
terraform.yml
File metadata and controls
49 lines (42 loc) · 1.55 KB
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
name: 'Stackgen CLI'
on:
pull_request:
types: [closed]
branches:
- main
permissions:
id-token: write
contents: read
pull-requests: write
jobs:
terraform:
name: 'Stackgen CLI'
runs-on: ubuntu-latest
if: github.event.pull_request.merged == true
defaults:
run:
working-directory: ${{ github.workspace }}
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install Stackgen CLI
run: |
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
echo 'eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)"' >> ~/.bashrc
source ~/.bashrc
- name: Stackgen Provision - Plan action
run: 'stackgen provision --appstack-id=7e3dbbf6-6d38-4766-9da6-6725d5d7a048 --var=`region=eu-west-3`'
env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
AWS_SESSION_TOKEN: ${{ secrets.AWS_SESSION_TOKEN }}
AWS_REGION: ${{ secrets.AWS_REGION }}
STACKGEN_PAT: ${{ secrets.STACKGEN_PAT }}
- name: Stackgen Provision - Apply action
run: 'stackgen provision --appstack-id=7e3dbbf6-6d38-4766-9da6-6725d5d7a048 --var=`region=eu-west-3` --apply'
env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
AWS_SESSION_TOKEN: ${{ secrets.AWS_SESSION_TOKEN }}
AWS_REGION: ${{ secrets.AWS_REGION }}
STACKGEN_PAT: ${{ secrets.STACKGEN_PAT }}