Skip to content

Commit 22cc4ed

Browse files
committed
fix: reusable workflow doesn't checkout called repository
1 parent 18a9891 commit 22cc4ed

File tree

1 file changed

+11
-2
lines changed

1 file changed

+11
-2
lines changed

.github/workflows/terraform.yaml

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ env:
4444
GITHUB_APP_INSTALLATION_ID: ${{ inputs.gh_app_installation_id || vars.APP_INSTALLATION_ID }}
4545
GITHUB_APP_PEM_FILE: ${{ secrets.gh_app_pem_file || secrets.APP_PEM_FILE }}
4646
TF_WORKSPACE: ${{ inputs.gh_owner || vars.OWNER }}
47-
TF_VAR_path: ${{ inputs.path || 'test.yaml' }}
47+
TF_VAR_path: iac/${{ inputs.path || 'test.yaml' }}
4848

4949
jobs:
5050
terraform:
@@ -55,8 +55,17 @@ jobs:
5555
shell: bash
5656

5757
steps:
58-
- name: Checkout the repository to the runner
58+
- name: Checkout called repository
5959
uses: actions/checkout@v4
60+
with:
61+
repository: 'xebis/github-organization-as-code'
62+
63+
- name: Checkout caller YAML configuration
64+
uses: actions/checkout@v4
65+
with:
66+
path: iac
67+
sparse-checkout: ${{ inputs.path || 'test.yaml' }}
68+
sparse-checkout-cone-mode: false
6069

6170
- name: Setup Terraform with specified version on the runner
6271
uses: hashicorp/setup-terraform@v3

0 commit comments

Comments
 (0)