diff --git a/.github/workflows/ci-subaction.yml b/.github/workflows/ci-subaction.yml index b36990f..cb84fc6 100644 --- a/.github/workflows/ci-subaction.yml +++ b/.github/workflows/ci-subaction.yml @@ -38,9 +38,15 @@ jobs: with: workdir: ./test/group - - name: Show targets - run: | - echo targets=${{ steps.gen.outputs.targets }} + name: Check targets + uses: actions/github-script@v7 + with: + script: | + const targets = `${{ steps.gen.outputs.targets }}`; + if (!targets) { + core.setFailed('No targets generated'); + } + core.info(`targets=${targets}`); list-targets-group-matrix: runs-on: ubuntu-latest @@ -56,9 +62,15 @@ jobs: workdir: ./test/group-matrix target: validate - - name: Show targets - run: | - echo targets=${{ steps.gen.outputs.targets }} + name: Check targets + uses: actions/github-script@v7 + with: + script: | + const targets = `${{ steps.gen.outputs.targets }}`; + if (!targets) { + core.setFailed('No targets generated'); + } + core.info(`targets=${targets}`); list-targets-multi-files: runs-on: ubuntu-latest @@ -76,6 +88,12 @@ jobs: docker-bake.json docker-bake.hcl - - name: Show targets - run: | - echo targets=${{ steps.gen.outputs.targets }} + name: Check targets + uses: actions/github-script@v7 + with: + script: | + const targets = `${{ steps.gen.outputs.targets }}`; + if (!targets) { + core.setFailed('No targets generated'); + } + core.info(`targets=${targets}`);