Skip to content

testing plan actions #20

Closed
wants to merge 8 commits into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 18 additions & 4 deletions .github/workflows/terraform_plan.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -49,10 +49,24 @@ 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: CSVD/create-github-app-token@v1
with:
app-id: ${{ vars.GH_APP_ID }}
private-key: ${{ secrets.GH_APP_PEM_FILE }}
github-api-url: https://github.e.it.census.gov/api/v3
owner: "CSVD"

- name: Use the token
env:
GITHUB_TOKEN: ${{ steps.generate-token.outputs.token }}
run: echo GITHUB_TOKEN=$GITHUB_TOKEN >> $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: Terraform Init
id: init
Expand Down
Loading