Skip to content

Commit

Permalink
feat(make-sure-label-is-present): new workflow
Browse files Browse the repository at this point in the history
Signed-off-by: M. Fatih Cırıt <mfc@leodrive.ai>

result

Signed-off-by: M. Fatih Cırıt <mfc@leodrive.ai>

fix var

Signed-off-by: M. Fatih Cırıt <mfc@leodrive.ai>

toJson

Signed-off-by: M. Fatih Cırıt <mfc@leodrive.ai>

if space, noJson

Signed-off-by: M. Fatih Cırıt <mfc@leodrive.ai>

test test-label

Signed-off-by: M. Fatih Cırıt <mfc@leodrive.ai>

test

Signed-off-by: M. Fatih Cırıt <mfc@leodrive.ai>

test

Signed-off-by: M. Fatih Cırıt <mfc@leodrive.ai>

as it is

Signed-off-by: M. Fatih Cırıt <mfc@leodrive.ai>
  • Loading branch information
M. Fatih Cırıt committed Jun 12, 2024
1 parent 9a6e0b7 commit ffb4973
Showing 1 changed file with 31 additions and 0 deletions.
31 changes: 31 additions & 0 deletions .github/workflows/make-sure-label-is-present.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: make-sure-label-is-present

on:
workflow_call:
inputs:
label:
required: true
type: string
outputs:
result:
value: ${{ jobs.make-sure-label-is-present.outputs.result }}

jobs:
make-sure-label-is-present:
runs-on: ubuntu-latest
outputs:
result: ${{ steps.make-sure-label-is-present.outputs.result }}
steps:
- name: Check if label is present
id: make-sure-label-is-present
if: contains(github.event.pull_request.labels.*.name, inputs.label)
run: |
echo "result=true" >> $GITHUB_OUTPUT
shell: bash

- name: Skip if label is not present
if: steps.make-sure-label-is-present.outputs.result != 'true'
run: |
echo "Please add the label '${{ inputs.label }}' to run this workflow."
echo "result=false" >> $GITHUB_OUTPUT
shell: bash

0 comments on commit ffb4973

Please sign in to comment.