Skip to content

Commit

Permalink
refactor: remove duplicate gh-auth/insteadOf steps, delegate to terra…
Browse files Browse the repository at this point in the history
…form-validate action

- Action (CSVD/terraform-validate) now accepts github_app_pem_file and handles
  gh-auth + git config insteadOf internally
- Remove inline Setup GITHUB Credentials + Configure Git HTTPS steps from workflow
- Pass credentials directly to the action via 'with' inputs
- Resolves CSVDIES-10490
  • Loading branch information
Dave Arnold committed Jul 23, 2026
1 parent f76ef2e commit 0cf9077
Showing 1 changed file with 4 additions and 13 deletions.
17 changes: 4 additions & 13 deletions .github/workflows/terraform-validate.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,19 +13,6 @@ jobs:
- name: Checkout code
uses: CSVD/gh-actions-checkout@v4

- name: Setup GITHUB Credentials
id: github_credentials
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_app_id: ${{ vars.GH_APP_ID }}

- name: Configure Git HTTPS for Terraform module pulls
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: Setup Terraform
uses: CSVD/gh-actions-setup-terraform@v2
with:
Expand All @@ -34,6 +21,10 @@ jobs:
- name: Validate Terraform Configuration
id: validate
uses: CSVD/terraform-validate@main
with:
github_app_pem_file: ${{ secrets.GH_APP_PEM_FILE }}
github_app_installation_id: ${{ vars.GH_APP_INSTALLATION_ID }}
github_app_id: ${{ vars.GH_APP_ID }}

- name: Check Validation/Test Results
if: always()
Expand Down

0 comments on commit 0cf9077

Please sign in to comment.