Using AWS_PROFILE conditionally #4
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
| name: PR build and test | |
| on: | |
| push: | |
| branches: [VED-358-github-actions-for-int] | |
| workflow_dispatch: | |
| inputs: | |
| dummy: | |
| description: 'Manual trigger (optional input)' | |
| required: false | |
| default: '' | |
| jobs: | |
| test-oidc: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| id-token: write | |
| contents: read | |
| steps: | |
| - name: Debug OIDC | |
| uses: aws-actions/configure-aws-credentials@v4 | |
| with: | |
| aws-region: eu-west-2 | |
| role-to-assume: arn:aws:iam::084828561157:role/auto-ops | |
| role-session-name: github-actions | |
| - name: Whoami | |
| run: aws sts get-caller-identity | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 1 | |
| - uses: hashicorp/setup-terraform@v3 | |
| with: | |
| terraform_version: "1.12.2" | |
| - name: Terraform Init | |
| working-directory: ./terraform_old | |
| run: | | |
| make init | |
| - name: Terraform Plan | |
| working-directory: ./terraform_old | |
| run: | | |
| make plan environment=green aws_account_no=int | |
| # - name: Set up Python | |
| # id: setup_python | |
| # uses: actions/setup-python@v5 | |
| # with: | |
| # python-version: "3.10.16" # this is for e2e tests | |
| # - name: cache virtualenv | |
| # uses: actions/cache@v4 | |
| # id: cache-venv | |
| # with: | |
| # path: ./.venv/ | |
| # key: ${{ hashFiles('**/*requirements.txt') }} | |
| # restore-keys: ${{ hashFiles('**/*requirements.txt') }} | |
| # - name: Install dependencies | |
| # if: steps.cache-venv.outputs.cache-hit != 'true' | |
| # run: make install-dev-requirements |