Skip to content

Merge pull request #6 from cabinetoffice/vrs-dnssec #19

Merge pull request #6 from cabinetoffice/vrs-dnssec

Merge pull request #6 from cabinetoffice/vrs-dnssec #19

Workflow file for this run

name: Test and deploy DNS to AWS
on:
push:
branches: [ main ]
paths:
- 'dns/*'
workflow_dispatch:
jobs:
test-and-deploy:
runs-on: ubuntu-latest
environment: aws
steps:
- name: Checkout infrastructure-as-code (public) repo
uses: actions/checkout@v3
with:
repository: cabinetoffice/security.gov.uk-iac
path: security.gov.uk-iac
- name: Read .terraform-version file
id: terraformversion
run: echo "tf_version=$(cat security.gov.uk-iac/.terraform-version)" >> $GITHUB_ENV
- uses: hashicorp/setup-terraform@v2
with:
terraform_version: ${{ env.tf_version }}
- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v1
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws-region: eu-west-2
- name: Deploy DNS to AWS
shell: bash
run: |
cd security.gov.uk-iac/dns/
terraform init
terraform apply -auto-approve
env:
TF_VAR_IS_CI: 1