Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 21 additions & 2 deletions .github/workflows/call.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
4 changes: 2 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Test Expression
name: Test Expressions
on:
pull_request:
workflow_dispatch:
Expand All @@ -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
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
Hello
READING