Skip to content

Commit

Permalink
Back to directory for 'uses'
Browse files Browse the repository at this point in the history
  • Loading branch information
jonhoo committed Jan 2, 2024
1 parent bffcfe1 commit ec3eb98
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 8 deletions.
6 changes: 2 additions & 4 deletions .github/workflows/terraform-apply.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ env:
TF_CLOUD_ORGANIZATION: ${{ vars.TF_CLOUD_ORGANIZATION }}
TF_API_TOKEN: ${{ secrets.TF_API_TOKEN }}
TF_WORKSPACE: ${{ vars.TF_WORKSPACE }}
CONFIG_DIRECTORY: "infra/"
CONFIG_DIRECTORY: "./infra"
## Additional env variables
# TF_LOG: DEBUG ## Helpful for troubleshooting
# TF_MAX_TIMEOUT: "30m" ## If you wish to override the default "1h"
Expand Down Expand Up @@ -70,20 +70,18 @@ jobs:

- uses: hashicorp/tfc-workflows-github/actions/[email protected]
id: upload
working-directory: ${{ env.CONFIG_DIRECTORY }}
with:
workspace: ${{ env.TF_WORKSPACE }}
directory: ${{ env.CONFIG_DIRECTORY }}

- uses: hashicorp/tfc-workflows-github/actions/[email protected]
id: create-run
working-directory: ${{ env.CONFIG_DIRECTORY }}
with:
workspace: ${{ env.TF_WORKSPACE }}
configuration_version: ${{ steps.upload.outputs.configuration_version_id }}

- uses: hashicorp/tfc-workflows-github/actions/[email protected]
id: apply
working-directory: ${{ env.CONFIG_DIRECTORY }}
if: ${{ fromJSON(steps.create-run.outputs.payload).data.attributes.actions.IsConfirmable }}
with:
run: ${{ steps.create-run.outputs.run_id }}
Expand Down
6 changes: 2 additions & 4 deletions .github/workflows/terraform-plan.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ env:
TF_CLOUD_ORGANIZATION: ${{ vars.TF_CLOUD_ORGANIZATION }}
TF_API_TOKEN: ${{ secrets.TF_API_TOKEN }}
TF_WORKSPACE: ${{ vars.TF_WORKSPACE }}
CONFIG_DIRECTORY: "infra/"
CONFIG_DIRECTORY: "./infra"
## Additional env variables
# TF_LOG: DEBUG ## Helpful for troubleshooting
# TF_MAX_TIMEOUT: "30m" ## If you wish to override the default "1h"
Expand Down Expand Up @@ -71,14 +71,13 @@ jobs:

- uses: hashicorp/tfc-workflows-github/actions/[email protected]
id: upload
working-directory: ${{ env.CONFIG_DIRECTORY }}
with:
workspace: ${{ env.TF_WORKSPACE }}
directory: ${{ env.CONFIG_DIRECTORY }}
speculative: true

- uses: hashicorp/tfc-workflows-github/actions/[email protected]
id: run
working-directory: ${{ env.CONFIG_DIRECTORY }}
## run may fail, if so continue to output PR comment
## step.terraform-cloud-check-run-status will fail job after pr comment is created/updated.
continue-on-error: true
Expand All @@ -90,7 +89,6 @@ jobs:

- uses: hashicorp/tfc-workflows-github/actions/[email protected]
id: plan-output
working-directory: ${{ env.CONFIG_DIRECTORY }}
with:
plan: ${{ steps.run.outputs.plan_id }}

Expand Down

0 comments on commit ec3eb98

Please sign in to comment.