-
Notifications
You must be signed in to change notification settings - Fork 0
46 lines (38 loc) · 1.63 KB
/
apply.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
43
44
45
46
name: Build infra
on:
pull_request:
branches: [main]
push:
branches: [main]
env:
HOME: ./temp_home
jobs:
build:
name: Build infrastructure
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
with:
path: ${{ env.SRC_PREFIX }}
- name: Install Doppler CLI
run: |
sudo apt-get update && sudo apt-get install -y apt-transport-https ca-certificates curl gnupg
curl -sLf --retry 3 --tlsv1.2 --proto "=https" 'https://packages.doppler.com/public/cli/gpg.DE2A7741A397C129.key' | sudo gpg --dearmor -o /usr/share/keyrings/doppler-archive-keyring.gpg
echo "deb [signed-by=/usr/share/keyrings/doppler-archive-keyring.gpg] https://packages.doppler.com/public/cli/deb/debian any-version main" | sudo tee /etc/apt/sources.list.d/doppler-cli.list
sudo apt-get update && sudo apt-get install doppler
- name: Setup Doppler
env:
DOPPLER_ACESS_TOKEN: ${{ secrets.DOPPLER_ACCESS_TOKEN }}
run: |
mkdir temp_home
doppler setup --no-interactive -t ${{ secrets.DOPPLER_ACCESS_TOKEN }}
- name: Install Terraform CLI
uses: hashicorp/setup-terraform@v2
with:
cli_config_credentials_token: ${{ secrets.TF_API_TOKEN }}
- name: Run Terraform
env:
TF_API_TOKEN: ${{ secrets.TF_API_TOKEN }}
run: |
./scripts/apply_terraform.sh