Skip to content
This repository has been archived by the owner on Jun 3, 2024. It is now read-only.

Workflows/test workflow #8

Workflows/test workflow

Workflows/test workflow #8

# This workflow will ensure that PR is labeled, so later we can create releases
name: Check PR label
on:
pull_request:
types: [opened, labeled, unlabeled, synchronize]
jobs:
check-pr-label:
runs-on: ubuntu-latest
steps:
- name: Check Labels
uses: docker://agilepathway/pull-request-label-checker:latest
with:
one_of: "PR: Internal 🏠,PR: Bugfix πŸ›,PR: New Feature πŸ•Ή,PR: Dependencies πŸ› ,PR: Documentation πŸ“–,PR: Icon πŸ’Ž,PR: Breaking Changes πŸ’₯"
repo_token: ${{ secrets.GITHUB_TOKEN }}
- name: Find Comment
if: always()
uses: peter-evans/find-comment@v1
id: fc
with:
issue-number: ${{ github.event.pull_request.number }}
comment-author: "github-actions[bot]"
body-includes: "Your PR should include one (and only one) of the following labels"
- name: Delete comment
if: ${{ steps.fc.outputs.comment-id }} # Otherwise it fails the workflow
uses: jungwinter/comment@v1
with:
type: delete
comment_id: ${{ steps.fc.outputs.comment-id }}
token: ${{ secrets.GITHUB_TOKEN }}
- name: Create or update comment
if: failure()
uses: peter-evans/create-or-update-comment@v1
with:
comment-id: ${{ steps.fc.outputs.comment-id }}
issue-number: ${{ github.event.pull_request.number }}
body: |
Your PR should include one (and only one) of the following labels:
- PR: Bugfix πŸ›
- PR: New Feature πŸ•Ή
- PR: Dependencies πŸ› 
- PR: Documentation πŸ“–
- PR: Internal 🏠
- PR: Breaking Changes πŸ’₯
- PR: Icon πŸ’Ž
edit-mode: replace