ci: fix issue with betabooru deploy workflow.

Just trigger on pushes to the betabooru branch instead of on the Docker
image being built. The workflow_run event keeps triggering on the master
branch even though it's supposed to only trigger on the betabooru
branch. This makes it fail because it doesn't have access to the secrets
in the betabooru environment.

This does mean the deploy will fail if the image hasn't been previously
built by a push to master first.
This commit is contained in:
evazion
2021-09-22 12:28:41 -05:00
parent 6740ef17ab
commit 259e3fde68

View File

@@ -8,14 +8,11 @@ permissions: read-all
on:
# https://docs.github.com/en/actions/reference/events-that-trigger-workflows#workflow_run
workflow_dispatch:
workflow_run:
workflows: ["Docker Build"]
types: [completed]
push:
branches: [betabooru]
jobs:
deploy-betabooru:
if: ${{ github.event_name == 'workflow_dispatch' || github.event.workflow_run.conclusion == 'success' }}
runs-on: ubuntu-latest
# https://docs.github.com/en/actions/learn-github-actions/workflow-syntax-for-github-actions#concurrency