diff --git a/.github/workflows/reusable_test_runner.yaml b/.github/workflows/reusable_test_runner.yaml index 57df9cfe..efc3e40c 100644 --- a/.github/workflows/reusable_test_runner.yaml +++ b/.github/workflows/reusable_test_runner.yaml @@ -7,16 +7,30 @@ on: required: true description: Directory name for the example to test type: string + zilla-image-tag: + default: latest + description: Zilla Image tag + type: string + zilla-image-artifact-name: + default: zilla-image-artifact + description: Artifact name for a Zilla Image + type: string workflow_call: inputs: example-dir: required: true type: string + zilla-image-tag: + type: string + zilla-image-artifact-name: + type: string jobs: runner: runs-on: ubuntu-latest + env: + ZILLA_VERSION: ${{ inputs.zilla-image-tag }} steps: - name: Checkout uses: actions/checkout@v4 @@ -29,6 +43,19 @@ jobs: with: key: docker-${{ runner.os }}-${{ inputs.example-dir }}-${{ hashFiles(format('{0}/compose.yaml', inputs.example-dir)) }} + - name: Download artifact + if: ${{ inputs.zilla-image-artifact-name != '' }} + uses: actions/download-artifact@v4 + with: + name: ${{ inputs.zilla-image-artifact-name }} + path: /tmp + + - name: Load image + if: ${{ inputs.zilla-image-artifact-name != '' }} + run: | + docker load --input /tmp/${{ inputs.zilla-image-artifact-name }}.tar + docker image ls -a + - name: Setup run: ./startup.sh ${{ inputs.example-dir }} - name: Wait for Zilla to be healthy diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index 06577b77..139b4e90 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -8,7 +8,7 @@ jobs: get-examples-with-changes: runs-on: ubuntu-latest outputs: - changed_directories: ${{ steps.set-output.outputs.changed_directories }} # The `dirs` doesn't exist in the outputs of changed-files@v35 action. + changed_directories: ${{ steps.set-output.outputs.changed_directories }} steps: - uses: actions/checkout@v4 with: