From 3a9ca29e99482defec5f2311db6d6cfe0b61371f Mon Sep 17 00:00:00 2001 From: JonnyWong16 <9099342+JonnyWong16@users.noreply.github.com> Date: Thu, 17 Dec 2020 18:28:50 -0800 Subject: [PATCH] Add pull request to workflows --- .github/workflows/publish-docker.yml | 9 +++++---- .github/workflows/publish-installers.yml | 5 +++-- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/.github/workflows/publish-docker.yml b/.github/workflows/publish-docker.yml index 7c290902..fc06f9f3 100644 --- a/.github/workflows/publish-docker.yml +++ b/.github/workflows/publish-docker.yml @@ -4,6 +4,7 @@ on: push: branches: [master, beta, nightly] tags: [v*] + pull_request: ~ jobs: build-docker: @@ -54,14 +55,14 @@ jobs: - name: Login to DockerHub uses: docker/login-action@v1 - if: success() + if: success() && github.event_name != 'pull_request' with: username: ${{ secrets.DOCKER_USERNAME }} password: ${{ secrets.DOCKER_PASSWORD }} - name: Login to GitHub Container Registry uses: docker/login-action@v1 - if: success() + if: success() && github.event_name != 'pull_request' with: registry: ghcr.io username: ${{ secrets.DOCKER_USERNAME }} @@ -73,7 +74,7 @@ jobs: with: context: . file: ./Dockerfile - push: true + push: ${{ github.event_name != 'pull_request' }} platforms: ${{ steps.prepare.outputs.docker_platforms }} build-args: | TAG=${{ steps.prepare.outputs.tag }} @@ -88,7 +89,7 @@ jobs: - name: Post Status to Discord uses: sarisia/actions-status-discord@v1 - if: always() + if: always() && github.event_name != 'pull_request' with: webhook: ${{ secrets.DISCORD_WEBHOOK }} status: ${{ job.status }} diff --git a/.github/workflows/publish-installers.yml b/.github/workflows/publish-installers.yml index c93f2fd1..9f73b973 100644 --- a/.github/workflows/publish-installers.yml +++ b/.github/workflows/publish-installers.yml @@ -4,6 +4,7 @@ on: push: branches: [master, beta, nightly] tags: [v*] + pull_request: ~ jobs: build-installer: @@ -93,7 +94,7 @@ jobs: - name: Post Status to Discord uses: sarisia/actions-status-discord@v1 - if: always() + if: always() && github.event_name != 'pull_request' with: webhook: ${{ secrets.DISCORD_WEBHOOK }} status: ${{ job.status }} @@ -103,7 +104,7 @@ jobs: release: name: Release Installers needs: build-installer - if: startsWith(github.ref, 'refs/tags/') && always() + if: always() && startsWith(github.ref, 'refs/tags/') && github.event_name != 'pull_request' runs-on: ubuntu-latest steps: - name: Get Build Job Status