feat: add support for processing instructions #125
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: Semver Check | ||
|
Check warning on line 1 in .github/workflows/semver-check.yml
|
||
| on: | ||
| pull_request_target: | ||
| # Remove all default permissions first | ||
| permissions: {} | ||
| jobs: | ||
| semver_check: | ||
| name: SemVer compatibility check | ||
| uses: ./.github/workflows/semver-check-helper.yml | ||
| with: | ||
| pull_request_number: ${{ github.event.pull_request.number }} | ||
| # Read content permission is required to checkout the PR | ||
| permissions: | ||
| contents: read | ||
| assign_labels: | ||
| name: Assign SemVer label | ||
| needs: semver_check | ||
| runs-on: ubuntu-latest | ||
| permissions: | ||
| pull-requests: write | ||
| steps: | ||
| # We can't trust the output of the semver_check job, so we need | ||
| # to first validate that the labels are the expected labels. | ||
| - name: Validate label | ||
| run: | | ||
| case "$LABEL" in | ||
| V-breaking|V-non-breaking) ;; | ||
| *) echo "FATAL: Unexpected label: $LABEL"; exit 1 ;; | ||
| esac | ||
| env: | ||
| LABEL: ${{ needs.semver_check.outputs.label }} | ||
| - name: Assign labels | ||
| run: | | ||
| gh pr edit "$NUMBER" --remove-label V-breaking --remove-label V-non-breaking | ||
| gh pr edit "$NUMBER" --add-label "${LABEL}" | ||
| env: | ||
| GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
| GH_REPO: ${{ github.repository }} | ||
| NUMBER: ${{ github.event.pull_request.number }} | ||
| LABEL: ${{ needs.semver_check.outputs.label }} | ||