PLT-754 Ensure runner runs as root #48
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Terraform plan for github-actions-runner terraform | |
on: | |
pull_request: | |
paths: | |
- .github/workflows/github-actions-runner-plan.yml | |
- actions/setup-tfenv-terraform/** | |
- terraform/services/github-actions-runner/** | |
workflow_dispatch: # Allow manual trigger | |
jobs: | |
check-terraform-fmt: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: ./actions/setup-tfenv-terraform | |
- run: terraform fmt -check -diff -recursive ./terraform/services/github-actions-runner | |
terraform-plan: | |
needs: check-terraform-fmt | |
permissions: | |
contents: read | |
id-token: write | |
runs-on: ubuntu-latest | |
defaults: | |
run: | |
working-directory: ./terraform/services/github-actions-runner | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: ./actions/setup-tfenv-terraform | |
- uses: aws-actions/configure-aws-credentials@v4 | |
with: | |
role-to-assume: arn:aws:iam::${{ secrets.BCDA_ACCOUNT }}:role/delegatedadmin/developer/bcda-mgmt-github-actions | |
aws-region: ${{ vars.AWS_REGION }} | |
- run: terraform init -backend-config=../../backends/bcda-mgmt.s3.tfbackend | |
- uses: cmsgov/ab2d-bcda-dpc-platform/actions/aws-params-env-action@main | |
env: | |
AWS_REGION: ${{ vars.AWS_REGION }} | |
with: | |
params: | | |
TF_VAR_ami_account=/github-runner/ami-account | |
TF_VAR_app_id=/github-runner/app-id | |
TF_VAR_key_base64=/github-runner/app-key-base64 | |
TF_VAR_webhook_secret=/github-runner/webhook-secret | |
- run: terraform plan |