diff --git a/.github/workflows/dockerpublish.yml b/.github/workflows/dockerpublish.yml index 1831c17..875aedd 100644 --- a/.github/workflows/dockerpublish.yml +++ b/.github/workflows/dockerpublish.yml @@ -2,8 +2,12 @@ name: Docker Image CI on: push: - branches: '**' + branches: + - 'master' tags: '**' + pull_request: + branches: + - 'master' schedule: - cron: 0 0 * * 6 @@ -27,7 +31,6 @@ jobs: suffix=-${{ matrix.php_version }} tags: | type=schedule,pattern={{date 'YYYYMMDD'}} - type=ref,event=branch type=ref,event=tag type=semver,pattern={{version}} type=raw,value=latest @@ -39,7 +42,7 @@ jobs: uses: docker/setup-buildx-action@v1 - name: Login to Docker Hub - if: ${{ (github.repository == 'laradock/workspace') && (github.ref == 'refs/heads/master') }} + if: ${{ (github.repository == 'laradock/workspace') }} uses: docker/login-action@v1 with: username: ${{ secrets.DOCKER_HUB_USER }} @@ -50,5 +53,5 @@ jobs: with: file: Dockerfile-${{ matrix.php_version }} platforms: linux/amd64,linux/arm64,linux/386,linux/arm/v7,linux/arm/v6 - push: ${{ (github.repository == 'laradock/workspace') && (github.ref == 'refs/heads/master') }} + push: ${{ (github.repository == 'laradock/workspace') }} tags: ${{ steps.meta.outputs.tags }}