From cfbbcbdbc3732816bcdf1bf5a3c21779cf2f6855 Mon Sep 17 00:00:00 2001 From: gomez385 Date: Mon, 7 Oct 2024 13:55:32 -0400 Subject: [PATCH] testing plan actions --- .github/workflows/terraform_plan.yaml | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) diff --git a/.github/workflows/terraform_plan.yaml b/.github/workflows/terraform_plan.yaml index d57aa70..b8eed26 100644 --- a/.github/workflows/terraform_plan.yaml +++ b/.github/workflows/terraform_plan.yaml @@ -49,10 +49,21 @@ jobs: aws configure set aws_session_token `jq -r '.Token' aws_credentials.json` echo AWS_SESSION_TOKEN=`jq -r '.Token' aws_credentials.json` >> $GITHUB_ENV - - 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 + - name: Generate a token + id: generate-token + uses: actions/create-github-app-token@v1 + with: + app-id: ${{ vars.GH_APP_ID }} + private-key: ${{ secrets.GH_APP_PEM_FILE }} + + - name: Use the token + env: + GITHUB_TOKEN: ${{ steps.generate-token.outputs.token }} + + #- 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 - name: Terraform Init id: init