Feature/matrix #8
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Label Pull Request | |
on: | |
pull_request: | |
# Only following types are handled by the action, but one can default to all as well | |
types: [opened, reopened, synchronize] | |
permissions: | |
contents: read | |
jobs: | |
configure-labels: | |
permissions: | |
issues: write | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@09d2acae674a48949e3602304ab46fd20ae0c42f | |
- name: Configure missing labels | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
run: | | |
gh label ls --json name > labels.json | |
jq -e 'if map(select(.name | contains ("patch"))) == [] then null else "Label patch exists" end' labels.json || gh label create patch --color "006b75" | |
jq -e 'if map(select(.name | contains ("minor"))) == [] then null else "Label minor exists" end' labels.json || gh label create minor --color "fbca04" | |
jq -e 'if map(select(.name | contains ("major"))) == [] then null else "Label major exists" end' labels.json || gh label create major --color "b60205" | |
label-pr: | |
permissions: | |
contents: read | |
pull-requests: write | |
runs-on: ubuntu-latest | |
steps: | |
- uses: release-drafter/release-drafter@b1476f6e6eb133afa41ed8589daba6dc69b4d3f5 | |
with: | |
disable-autolabeler: false | |
disable-releaser: true | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |