Skip to content

Commit

Permalink
Update terraform_plan.yaml: Update GitHub credentials setup
Browse files Browse the repository at this point in the history
  • Loading branch information
gomez385 committed Oct 15, 2024
1 parent ba67417 commit 2e46265
Showing 1 changed file with 10 additions and 7 deletions.
17 changes: 10 additions & 7 deletions .github/workflows/terraform_plan.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
# This workflow contains a single job called "build"
Plan:
# The type of runner that the job will run on
runs-on: [ "229685449397" ]
runs-on: ["229685449397"]

env:
GITHUB_APP_INSTALLATION_ID: ${{ vars.GH_APP_INSTALLATION_ID }}
Expand Down Expand Up @@ -46,8 +46,11 @@ jobs:

- name: Setup GITHUB Credentials
id: github_credentials
run: |
echo GITHUB_TOKEN=$(python encode_jwt.py "$GITHUB_APP_PEM_FILE" "$GITHUB_APP_INSTALLATION_ID" "$GITHUB_BASE_URL") >> $GITHUB_ENV
uses: CSVD/gh-auth@main
with:
github_app_pem_file: ${{ secrets.GH_APP_PEM_FILE }}
github_app_installation_id: ${{ vars.GH_APP_INSTALLATION_ID }}
github_base_url: ${{ vars.GITHUB_BASE_URL }}

- name: Terraform Init
uses: CSVD/terraform-init@main
Expand All @@ -60,9 +63,9 @@ jobs:
setup_terraform: true
terraform_init: true
env:
GITHUB_TOKEN: $GITHUB_TOKEN
GITHUB_TOKEN: ${{ steps.github_credentials.outputs.github_token }}
AWS_ACCESS_KEY_ID: ${{ steps.aws_auth.outputs.aws_access_key_id }}
AWS_SECRET_ACCESS_KEY: $${{ steps.aws_auth.outputs.aws_secret_access_key }}
AWS_SECRET_ACCESS_KEY: ${{ steps.aws_auth.outputs.aws_secret_access_key }}
AWS_SESSION_TOKEN: ${{ steps.aws_auth.outputs.aws_session_token }}

- name: debug outputs
Expand Down Expand Up @@ -90,9 +93,9 @@ jobs:
cache_key: ${{ steps.terraform_init.outputs.s3_upload_path }}
env:
AWS_ACCESS_KEY_ID: ${{ steps.aws_auth.outputs.aws_access_key_id }}
AWS_SECRET_ACCESS_KEY: $${{ steps.aws_auth.outputs.aws_secret_access_key }}
AWS_SECRET_ACCESS_KEY: ${{ steps.aws_auth.outputs.aws_secret_access_key }}
AWS_SESSION_TOKEN: ${{ steps.aws_auth.outputs.aws_session_token }}
GITHUB_TOKEN: ${{ env.GITHUB_TOKEN }}
GITHUB_TOKEN: ${{ steps.github_credentials.outputs.github_token }}
GITHUB_OWNER: CSVD
GITHUB_BASE_URL: https://github.e.it.census.gov/
HTTP_PROXY: http://proxy.tco.census.gov:3128
Expand Down

0 comments on commit 2e46265

Please sign in to comment.