diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 7d8a822..4fdcb1f 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -1,7 +1,12 @@ name: Publish on: + page_build: + pull_request: + branches: + - main push: - branches: main + branches: + - "**" tags: - "*.*.*" jobs: @@ -12,7 +17,7 @@ jobs: uses: actions/checkout@v2 - name: Prepare id: prep - uses: crazy-max/ghaction-docker-meta@v2 + uses: docker/metadata-action@v3 with: images: | ${{ github.repository_owner }}/mediawiki-ldap @@ -27,11 +32,13 @@ jobs: - name: Set up Docker Buildx uses: docker/setup-buildx-action@v1 - name: Login to DockerHub + if: github.event_name != 'pull_request' uses: docker/login-action@v1 with: username: ${{ secrets.DOCKERHUB_USERNAME }} password: ${{ secrets.DOCKERHUB_TOKEN }} - name: Login to GHCR + if: github.event_name != 'pull_request' uses: docker/login-action@v1 with: registry: ghcr.io @@ -42,7 +49,7 @@ jobs: with: context: . platforms: linux/amd64,linux/arm/v7,linux/ppc64le # linux/386,linux/arm/v6,linux/arm64,linux/s390x - push: true + push: ${{ github.event_name != 'pull_request' }} tags: ${{ steps.prep.outputs.tags }} labels: ${{ steps.prep.outputs.labels }} - name: Update Description