Skip to content

Dev deployments (#23) #19

Dev deployments (#23)

Dev deployments (#23) #19

name: Environment Main - Apply
on:
push:
branches:
- main
permissions:
id-token: write
contents: read
pull-requests: write
jobs:
envtest:
name: Environment Main - Apply
runs-on: ubuntu-latest
environment: primary-rw
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
steps:
- name: Checkout code
uses: actions/checkout@9a9194f87191a7e9055e3e9b95b8cfb13023bb08
- name: Configure AWS Access
uses: aws-actions/configure-aws-credentials@39228ca2bffc0bfc8f7761ce893f5b80e7eaaf8f
with:
role-to-assume: arn:aws:iam::${{ vars.AWS_ACCOUNT }}:role/${{ vars.AWS_ROLE }}
role-session-name: GitHubDeploy-${{ vars.ENVIRONMENT }}
aws-region: ${{ vars.AWS_REGION }}
- name: terraform apply
uses: dflook/terraform-apply@7d435d4d115a11e5db1e710ac969f5382f0f6f9f
with:
path: terraform/environment/wildsea
variables: |
environment="${{ vars.ENVIRONMENT }}"
saml_metadata_url="${{ secrets.SAML_METADATA_URL }}"
backend_config:
bucket=${{ vars.STATE_BUCKET }}
key=${{ vars.ENVIRONMENT }}/terraform.tfstate
region=${{ vars.AWS_REGION }}