feat(ci): add missing feat label checker #3
Workflow file for this run
This file contains 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: Incorrect PR Label Check | |
on: | |
pull_request: | |
branches: ['main'] | |
jobs: | |
# More info at https://github.com/Roave/BackwardCompatibilityCheck. | |
incorrectly-labelled-check: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
- name: "Install PHP" | |
uses: shivammathur/setup-php@v2 | |
with: | |
php-version: "8.1" | |
- name: "Install dependencies" | |
run: composer global require "roave/backward-compatibility-check:^8.2" | |
- name: Get Latest Release | |
if: github.event.pull_request.user.login == 'release-please[bot]' | |
id: latest-release | |
uses: pozetroninc/github-action-get-latest-release@master | |
with: | |
repository: ${{ github.repository }} | |
- name: "Check for an incorrect feat label in the PR" | |
if: ${{ github.event.pull_request.user.login == 'gcf-owl-bot' && startsWith(github.event.pull_request.title, 'feat')}} | |
# OwlBot PRs which are not labelled feat should not add new files | |
continue-on-error: true | |
run: | | |
~/.composer/vendor/bin/roave-backward-compatibility-check \ | |
--from=origin/main \ | |
--to=${{ steps.latest-release.outputs.release }} --format=github-actions |