Skip to content

Commit

Permalink
fix: add SSH-to-HTTPS git insteadOf config for terraform module pulls…
Browse files Browse the repository at this point in the history
… (CSVDIES-10219)
  • Loading branch information
Dave Arnold committed Jun 24, 2026
1 parent 0066310 commit d8aebe3
Showing 1 changed file with 26 additions and 0 deletions.
26 changes: 26 additions & 0 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,16 @@ inputs:
init_args:
required: false
description: "Terraform Init Args"
github_app_pem_file:
required: false
description: "GitHub App PEM file for SSH-to-HTTPS git rewrite during terraform init"
github_app_installation_id:
required: false
description: "GitHub App Installation ID for SSH-to-HTTPS git rewrite during terraform init"
github_app_id:
required: false
default: "6"
description: "GitHub App ID for SSH-to-HTTPS git rewrite during terraform init"
commit_sha:
required: false
default: ""
Expand Down Expand Up @@ -89,6 +99,22 @@ runs:
run: |
echo "TF_WORKSPACE=${{ inputs.workspace }}" >> $GITHUB_ENV
- name: Setup GITHUB Credentials
id: github_credentials
if: ${{ inputs.github_app_pem_file != '' }}
uses: CSVD/gh-auth@main
with:
github_app_pem_file: ${{ inputs.github_app_pem_file }}
github_app_installation_id: ${{ inputs.github_app_installation_id }}
github_app_id: ${{ inputs.github_app_id }}

- name: Configure Git HTTPS for Terraform module pulls
if: ${{ inputs.github_app_pem_file != '' }}
shell: bash
run: |
git config --global url."https://oauth2:${{ steps.github_credentials.outputs.github_token }}@github.e.it.census.gov/".insteadOf "git@github.e.it.census.gov:"
git config --global url."https://oauth2:${{ steps.github_credentials.outputs.github_token }}@github.e.it.census.gov/".insteadOf "ssh://git@github.e.it.census.gov/"
- name: Terraform Init
id: init_state
if: ${{ inputs.terraform_init == 'true' && inputs.state_bucket != '' }}
Expand Down

0 comments on commit d8aebe3

Please sign in to comment.