diff --git a/.github/workflows/terraform_plan.yaml b/.github/workflows/terraform_plan.yaml index 1f50699..d57aa70 100644 --- a/.github/workflows/terraform_plan.yaml +++ b/.github/workflows/terraform_plan.yaml @@ -51,8 +51,8 @@ jobs: - name: Setup GITHUB Credentials id: github_credentials - run: - python encode_jwt.py "${{ secrets.GITHUB_APP_PEM_FILE }}" "${{ vars.GITHUB_APP_INSTALLATION_ID }}" https://github.e.it.census.gov/" #>> $GITHUB_ENV + 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 diff --git a/encode_jwt.py b/encode_jwt.py index fd640d4..a777670 100644 --- a/encode_jwt.py +++ b/encode_jwt.py @@ -66,7 +66,7 @@ } # Make the request to the GitHub Enterprise API to get the installation access token -url = f"{args.enterprise_url}/api/v3/app/installations/{args.installation_id}/access_tokens" +url = f"{args.enterprise_url}api/v3/app/installations/{args.installation_id}/access_tokens" response = requests.post(url, headers=headers) # Check if the request was successful