Files
threshold/.github/workflows/test-ci-bootstrap-oss.yml
T
Timothy Messier 236d7ca872 ci: Additional githubaction configuration (#3034)
- Pin action versions
- Dependabot to notify about action updates
- Update codeowners
2023-03-01 08:00:46 -05:00

55 lines
1.8 KiB
YAML

name: test-ci-bootstrap-oss
permissions:
contents: read
on:
pull_request:
branches:
- main
paths:
- enos/ci/**
- .github/workflows/test-ci-bootstrap-oss.yml
push:
branches:
- main
paths:
- enos/ci/**
- .github/workflows/test-ci-bootstrap-oss.yml
jobs:
bootstrap-ci-oss:
if: ${{ github.event.repository.name == 'boundary' }}
env:
TF_WORKSPACE: "boundary-ci-enos-bootstrap"
TF_VAR_repository: boundary
TF_VAR_aws_ssh_public_key: ${{ secrets.SSH_KEY_PUBLIC_CI }}
TF_TOKEN_app_terraform_io: ${{ secrets.TF_API_TOKEN }}
runs-on: ${{ fromJSON(vars.RUNNER) }}
steps:
- uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0
- name: Set up Terraform
uses: hashicorp/setup-terraform@633666f66e0061ca3b725c73b2ec20cd13a8fdd1 # TSCCR: could not find tsccr entry for hashicorp/setup-terraform
- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@67fbcbb121271f7775d2e7715933280b06314838 # TSCCR: could not find tsccr entry for aws-actions/configure-aws-credentials
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID_CI }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY_CI }}
aws-region: us-east-1
role-to-assume: ${{ secrets.AWS_ROLE_ARN_CI }}
role-skip-session-tagging: true
role-duration-seconds: 3600
- name: Init Terraform
id: tf_init
run: |
terraform -chdir=enos/ci/bootstrap init
- name: Plan Terraform
id: tf_plan
run: |
terraform -chdir=enos/ci/bootstrap plan
- name: Apply Terraform
if: ${{ github.ref == 'refs/heads/main' }}
id: tf_apply
run: |
terraform -chdir=enos/ci/bootstrap apply -auto-approve