From 2b0061b6005277282698aa371cc990814f3477d7 Mon Sep 17 00:00:00 2001 From: Joshua Watt Date: Fri, 6 Oct 2023 11:18:56 -0600 Subject: [PATCH] ghactions: Skip yocto-check-layer on tag There is no reason to run this job when tagging and it takes a long time so skip it. --- .github/workflows/build-and-test.yaml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build-and-test.yaml b/.github/workflows/build-and-test.yaml index 36d2724..9a01400 100644 --- a/.github/workflows/build-and-test.yaml +++ b/.github/workflows/build-and-test.yaml @@ -95,6 +95,8 @@ 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 @@ -283,6 +285,7 @@ jobs: podman run --rm -it localhost/bitbake-hashserver-test-container-image:latest publish: + if: github.event_name == 'push' needs: - build - test @@ -300,12 +303,10 @@ jobs: name: "${{ env.IMAGE_NAME }}-${{ env.MACHINE }}-oci" - name: Login to registry - if: ${{ github.event_name == 'push' }} run: | echo "${{ secrets.GITHUB_TOKEN }}" | skopeo login ghcr.io --username $ --password-stdin - name: Push image - if: ${{ github.event_name == 'push' }} run: | IMAGE_ID=ghcr.io/${{ github.repository_owner }}/$IMAGE_NAME