From 238624f050f52706741e61e6233b931aa67fc0e0 Mon Sep 17 00:00:00 2001 From: Tommy Gatti Date: Tue, 6 Jan 2026 13:54:02 +1100 Subject: [PATCH 1/4] Update for PR --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index e965047..134cd2f 100644 --- a/README.md +++ b/README.md @@ -1 +1,2 @@ Hello +READING From 831c86839115305f9eb9a5008a1235d76874a176 Mon Sep 17 00:00:00 2001 From: Tommy Gatti Date: Wed, 7 Jan 2026 11:39:16 +1100 Subject: [PATCH 2/4] Test out explicit settings of repo --- .github/workflows/test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 0cf566a..d1025bf 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -9,4 +9,4 @@ jobs: repo-input: uses: codegat-test-org/test/.github/workflows/call.yml@main with: - spack-manifest-repository: codegat-test-org/another-repo + spack-manifest-repository: codegat-test-org/test From 8754a7c45f6e4be0f64ca23a631f46c30c69ba56 Mon Sep 17 00:00:00 2001 From: Tommy Gatti Date: Wed, 7 Jan 2026 12:42:16 +1100 Subject: [PATCH 3/4] Add another change after manually setting the default input --- .github/workflows/test.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index d1025bf..881ba56 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -1,4 +1,4 @@ -name: Test Expression +name: Test Expressions on: pull_request: workflow_dispatch: @@ -10,3 +10,4 @@ jobs: uses: codegat-test-org/test/.github/workflows/call.yml@main with: spack-manifest-repository: codegat-test-org/test +d \ No newline at end of file From a2bf12ef118fab3d933b7fb65c4fe99db18815aa Mon Sep 17 00:00:00 2001 From: Tommy Gatti Date: Wed, 7 Jan 2026 12:46:41 +1100 Subject: [PATCH 4/4] Test using init step --- .github/workflows/call.yml | 23 +++++++++++++++++++++-- .github/workflows/test.yml | 1 - 2 files changed, 21 insertions(+), 3 deletions(-) diff --git a/.github/workflows/call.yml b/.github/workflows/call.yml index bbd2681..9bb57b4 100644 --- a/.github/workflows/call.yml +++ b/.github/workflows/call.yml @@ -22,10 +22,29 @@ jobs: clone: runs-on: ubuntu-latest steps: + - name: Init - Initalize dynamic vars + id: init + # GitHub Actions doesn't allow expressions in the on.workflow_call.inputs.*.default section, so we need to define them here + # Furthermore, some outputs depend on the container being started, so we define them here as well + run: | + # Initializing dynamic default of inputs.spack-manifest-repository-ref... + + if [[ "${{ inputs.spack-manifest-repository-ref }}" != "" ]]; then + echo "spack-manifest-repository-ref=${{ inputs.spack-manifest-repository-ref }}" >> $GITHUB_OUTPUT + elif [[ "${{ inputs.spack-manifest-repository }}" == "${{ github.repository }}" ]]; then + if [[ "${{ github.event_name }}" == "pull_request" ]]; then + echo "spack-manifest-repository-ref=${{ github.event.pull_request.head.sha }}" >> $GITHUB_OUTPUT + else + echo "spack-manifest-repository-ref=${{ github.sha }}" >> $GITHUB_OUTPUT + fi + else + echo "spack-manifest-repository-ref=''" >> $GITHUB_OUTPUT + fi + - id: c uses: actions/checkout@v5 with: repository: ${{ inputs.spack-manifest-repository }} - ref: ${{ inputs.spack-manifest-repository-ref }} + ref: ${{ steps.init.outputs.spack-manifest-repository-ref }} - - run: echo ${{ steps.c.outputs.ref }} ${{ steps.c.outputs.commit }} + - run: echo ${{ steps.init.outputs.spack-manifest-repository-ref }} ${{ steps.c.outputs.ref }} ${{ steps.c.outputs.commit }} diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 881ba56..58e686c 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -10,4 +10,3 @@ jobs: uses: codegat-test-org/test/.github/workflows/call.yml@main with: spack-manifest-repository: codegat-test-org/test -d \ No newline at end of file