Skip to content

Commit

Permalink
Run the provenance workflow post merge or if explicitly labeled to (p…
Browse files Browse the repository at this point in the history
…roject-oak#4064)

* Run the provenance workflow post merge or if explicitly labeled to
  Tested that
  1. It runs the provenance workflow if PR has the specified label
  2. It does not run the workflow if the PR does not have the label
  • Loading branch information
rbehjati committed Jun 23, 2023
1 parent 4c270ed commit e66abe1
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/provenance.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,16 +9,16 @@ on:
push:
branches: [main]
# This workflow builds several binaries and is very time and resource consuming. As a result it
# disabled disabled by default on pull-request events. If you need to test this workflow on your
# PR before merge, label it with `provenance:force-run` to trigger the workflow.
# is disabled by default on pull-request events. If you need to test this workflow on your PR
# before merge, label it with `provenance:force-run` to trigger the workflow.
pull_request:
branches: [main]

jobs:
build_binary:
if: |
github.event_name == 'push' ||
github.event_name == 'pull-request' && ${{ contains(github.event.pull_request.labels.*.name, 'provenance:force-run') }}
contains(github.event.pull_request.labels.*.name, 'provenance:force-run')
# We use the same job template to generate provenances for multiple binaries.
strategy:
fail-fast: false
Expand Down

0 comments on commit e66abe1

Please sign in to comment.