From 913434828b32c984cfdc0f68c35bbf8eb69ceb83 Mon Sep 17 00:00:00 2001 From: Youe Graillot Date: Tue, 12 Oct 2021 01:17:43 +0200 Subject: [PATCH] CI reorganize --- .github/workflows/dockerhub.yml | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/.github/workflows/dockerhub.yml b/.github/workflows/dockerhub.yml index 5ec6be4d..930ffb5d 100644 --- a/.github/workflows/dockerhub.yml +++ b/.github/workflows/dockerhub.yml @@ -2,13 +2,11 @@ name: CI to Docker Hub on: push: - tags: - - '*' - branches: - - master + tags: ['*'] + branches: [ master ] + pull_request: + branches: [ master ] -env: - TEST_TAG: ${{ secrets.DOCKERHUB_USERNAME }}/${{ secrets.DOCKERHUB_REPOSITORY }}:test jobs: test: @@ -22,6 +20,8 @@ jobs: build: runs-on: ubuntu-latest + needs: test + if: github.event_name != 'pull_request' steps: - name: Checkout uses: actions/checkout@v2 @@ -58,7 +58,7 @@ jobs: builder: ${{ steps.buildx.outputs.name }} push: true labels: ${{ steps.meta.outputs.labels }} - tags: ${{ steps.meta.outputs.tags }}, ${{ env.TEST_TAG }} + tags: ${{ steps.meta.outputs.tags }} cache-from: type=local,src=/tmp/.buildx-cache cache-to: type=local,dest=/tmp/.buildx-cache