1
0
mirror of https://github.com/coreos/prometheus-operator.git synced 2026-02-05 06:45:27 +01:00

.github/workflows: fix publisher workflow

* Allow manually triggering workflow by adding workflow_dispatch
* Remove 'tags' keyword as it is not supported for workflow_run
* Fix condition to better detect event (used example from
  https://securitylab.github.com/research/github-actions-preventing-pwn-requests/)

Signed-off-by: paulfantom <pawel@krupa.net.pl>
This commit is contained in:
paulfantom
2021-07-06 19:20:37 +02:00
parent 2388bfa557
commit 223a2178af

View File

@@ -1,17 +1,16 @@
name: publish
on:
workflow_dispatch:
workflow_run:
workflows:
- "checks"
- "unit"
- "e2e"
- "checks"
- "unit"
- "e2e"
types: [completed]
branches:
- 'release-*'
- 'master'
- 'main'
tags:
- 'v*'
env:
golang-version: '1.16'
@@ -19,7 +18,11 @@ jobs:
publish:
runs-on: ubuntu-latest
name: Publish container images
if: ${{ github.event_name == 'push' && github.event.workflow_run.conclusion == 'success' }}
if: >
${{
github.event.workflow_run.event == 'push' &&
github.event.workflow_run.conclusion == 'success'
}}
steps:
- name: Checkout
uses: actions/checkout@v2