Skip to content

Commit

Permalink
Add github workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
BrentGruber committed Nov 6, 2023
1 parent 3bf7b4d commit fb67a01
Showing 1 changed file with 48 additions and 0 deletions.
48 changes: 48 additions & 0 deletions .github/workflows/apply.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
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
working-directory: ./oracle
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
working-directory: ./oracle
env:
TF_API_TOKEN: ${{ secrets.TF_API_TOKEN }}
run: |
./scripts/apply_terraform.sh

0 comments on commit fb67a01

Please sign in to comment.