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:
15
.github/workflows/publish.yaml
vendored
15
.github/workflows/publish.yaml
vendored
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user