From acce65ce6b1df86095f71a0a148417ce0cae5374 Mon Sep 17 00:00:00 2001 From: Joshua Watt Date: Fri, 6 Oct 2023 13:06:03 -0600 Subject: [PATCH] ghactions: Skip yocto-check-layer step instead of job Skipping the job means the publish job doesn't run and the images don't get pushed to the container registry. Skip the step to run the script instead --- .github/workflows/build-and-test.yaml | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build-and-test.yaml b/.github/workflows/build-and-test.yaml index 3affb66..834469b 100644 --- a/.github/workflows/build-and-test.yaml +++ b/.github/workflows/build-and-test.yaml @@ -96,8 +96,6 @@ jobs: ./meta-bitbake-hashserver/scripts/validate-layer-json.py yocto-check-layer: - # Don't run this on tag pushes - if: github.event_name != 'push' || ! startsWith(github.ref, 'refs/tags/') needs: - create-layer-cache @@ -143,6 +141,10 @@ jobs: yocto-check-layers- - name: Run yocto-check-layer + id: run-yocto-check-layer + # Don't run this on tag pushes. This step is skipped as opposed to the + # entire job so that dependent jobs will still run + if: github.event_name != 'push' || ! startsWith(github.ref, 'refs/tags/') run: | . ./core/oe-init-build-env @@ -159,7 +161,7 @@ jobs: $MACHINE - name: Save yocto-check-layers cache - if: steps.restore-yocto-check-layers-cache.outputs.cache-hit != 'true' + if: steps.restore-yocto-check-layers-cache.outputs.cache-hit != 'true' && steps.run-yocto-check-layer.outcome == 'success' uses: actions/cache/save@v3 with: path: |