name: Changelog label check
on:
  pull_request:
    types: [labeled, unlabeled]

jobs:
  check:
    runs-on: ubuntu-latest
    steps:
    - uses: actions/checkout@master
      with:
        ref: ${{ github.ref }}

    - name: Set up Python
      uses: actions/setup-python@v2
      with:
        python-version: '3.8'
      
    - name: Check changelog label
      run: python .github/workflows/changelog-label-check.py
