Add pull request to workflows

This commit is contained in:
JonnyWong16 2020-12-17 18:28:50 -08:00
parent a5834470ba
commit 3a9ca29e99
No known key found for this signature in database
GPG key ID: B1F1F9807184697A
2 changed files with 8 additions and 6 deletions

View file

@ -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 }}

View file

@ -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