GitHub Action 에서 특정 Label 이 붙은 PR 건너뛰기
GitHub-Action
단일 Label
name: Some Action for single label
on:
pull_request:
types: [opened]
jobs:
someAction:
if: ${{ !contains(github.event.pull_request.labels.*.name, 'label_name') }}
runs-on: ubuntu-latest
// 생략...
다중 Label
name: Some Action for multiple labels
on:
pull_request:
types: [opened]
jobs:
someAction:
if: >-
${{
!contains(github.event.pull_request.labels.*.name, 'label_name') &&
!contains(github.event.pull_request.labels.*.name, 'label_name2') &&
!contains(github.event.pull_request.labels.*.name, 'label_name3')
}}
runs-on: ubuntu-latest
// 생략...
참고 자료
- https://stackoverflow.com/a/74829754