Renovate Major Updates (major) #56
Workflow file for this run
This file contains hidden or 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
| # Workflow to run just the terraform when changes are made. | |
| # | |
| # The terraform used is only for testing the workspace manager action, | |
| # so is not run very often and rarely chanages. | |
| name: "[Workflow] Terraform Plan & Apply " | |
| on: | |
| pull_request: | |
| branches: | |
| - main | |
| paths: | |
| - terraform/** | |
| - .github/workflows/workflow_terraform.yml | |
| push: | |
| branches: | |
| - main | |
| paths: | |
| - terraform/** | |
| - .github/workflows/workflow_terraform.yml | |
| permissions: | |
| contents: read | |
| security-events: write | |
| jobs: | |
| terraform: | |
| name: "Plan and Apply" | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: "Checkout" | |
| uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1 | |
| # TODO: this is an older version of self, swap when we impliment the new version | |
| - name: "Get terraform account version" | |
| id: terraform_account_version | |
| uses: ministryofjustice/opg-github-actions/.github/actions/terraform-version@4202ec51fd9d613351e4c062606d857982ad70eb # v3.0.6 | |
| with: | |
| terraform_directory: ./terraform/account | |
| # configure the aws role | |
| - name: "Configure AWS credentials for terraform" | |
| id: configure_aws_creds | |
| uses: aws-actions/configure-aws-credentials@61815dcd50bd041e203e49132bacad1fd04d2708 # v5.1.1 | |
| with: | |
| aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} | |
| aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | |
| aws-region: "eu-west-1" | |
| role-session-name: github-actions-sample-workspace-manager-terraform | |
| # run the account level terraform | |
| - name: "Account level terraform" | |
| uses: ./.github/actions/terraform | |
| env: | |
| TF_VAR_aws_access_key_id: ${{ secrets.AWS_ACCESS_KEY_ID }} | |
| TF_VAR_aws_secret_access_key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | |
| TF_VAR_github_token: ${{ secrets.GIT_API_TOKEN }} | |
| TF_VAR_pagerduty_token: ${{ secrets.PAGERDUTY_TOKEN }} | |
| version: ${{ steps.terraform_account_version.outputs.version }} | |
| with: | |
| apply: true | |
| directory: ./terraform/account | |
| workspace: "default" | |
| version: ${{ env.version }} | |
| end: | |
| name: 'End' | |
| runs-on: 'ubuntu-latest' | |
| needs: | |
| - terraform | |
| steps: | |
| - name: "End" | |
| id: end | |
| run: echo "End" |