Skip to content

Commit

Permalink
🎨 try to use inputs
Browse files Browse the repository at this point in the history
  • Loading branch information
flaxel authored and 0x46616c6b committed Apr 25, 2024
1 parent 2d727ad commit 1afcb2d
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions .github/workflows/template_do_not_merge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@ name: Do Not Merge

on:
workflow_call:
inputs:
label:
required: false
type: string
default: do not merge

jobs:
do-not-merge:
Expand All @@ -14,7 +19,7 @@ jobs:
# see https://docs.github.com/en/actions/learn-github-actions/expressions#contains
steps:
- name: fail if label exists
if: contains(github.event.pull_request.labels.*.name, 'do not merge')
if: contains(github.event.pull_request.labels.*.name, inputs.label)
run: |
echo "This PR has the label 'do not merge'."
echo "This PR has the label '${{ inputs.label }}'."
exit 1

0 comments on commit 1afcb2d

Please sign in to comment.