Skip to content

feat: create org projects #108

feat: create org projects

feat: create org projects #108

Workflow file for this run

name: Infrastructure
concurrency:
cancel-in-progress: false
group: '${{ github.workflow }}'
on:
push:
branches:
- main
pull_request:
workflow_dispatch:
permissions:
contents: read
env:
terragrunt_version: '0.53.4'
jobs:
check_secrets:
name: Check secrets
runs-on: ubuntu-latest
strategy:
matrix:
secretName:
- GH_ADMIN_TOKEN
- PG_CONN_STR
- ELEPHANTSQL_APIKEY
- GANDI_KEY
- IMPROVMX_API_TOKEN
steps:
- uses: actions/checkout@v3
- name: "Check: ${matrix.secretName}"
uses: ./.github/actions/check-env-var
with:
env_var: ${{ secrets[matrix.secretName] }}
plan:
name: "Terragrunt: Plan"
needs: [check_secrets]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: opentofu/setup-opentofu@v1
with:
tofu_wrapper: false
- uses: ./.github/actions/install-terragrunt
with:
version: ${{ env.terragrunt_version }}
- name: Plan
working-directory: stages
env:
GH_ADMIN_TOKEN: ${{ secrets.GH_ADMIN_TOKEN }}
PG_CONN_STR: ${{ secrets.PG_CONN_STR }}
ELEPHANTSQL_APIKEY: ${{ secrets.ELEPHANTSQL_APIKEY }}
GANDI_KEY: ${{ secrets.GANDI_KEY }}
IMPROVMX_API_TOKEN: ${{ secrets.IMPROVMX_API_TOKEN }}
run: terragrunt run-all plan --terragrunt-non-interactive
apply:
name: "Terragrunt: Apply"
needs: [plan]
if: github.ref == 'refs/heads/main'
environment: live
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: opentofu/setup-opentofu@v1
with:
tofu_wrapper: false
- uses: ./.github/actions/install-terragrunt
with:
version: ${{ env.terragrunt_version }}
- name: Apply
working-directory: stages
env:
GH_ADMIN_TOKEN: ${{ secrets.GH_ADMIN_TOKEN }}
PG_CONN_STR: ${{ secrets.PG_CONN_STR }}
ELEPHANTSQL_APIKEY: ${{ secrets.ELEPHANTSQL_APIKEY }}
GANDI_KEY: ${{ secrets.GANDI_KEY }}
IMPROVMX_API_TOKEN: ${{ secrets.IMPROVMX_API_TOKEN }}
run: terragrunt run-all apply -auto-approve --terragrunt-non-interactive