Compile Time Type Validation For Custom Constraints #45
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: Release PR auto-merge | |
| on: pull_request | |
| permissions: | |
| contents: write | |
| pull-requests: write | |
| jobs: | |
| dependabot: | |
| runs-on: ubuntu-latest | |
| if: ${{ github.actor == 'github-actions[bot]'}} | |
| steps: | |
| - name: Check PR Title | |
| run: | | |
| PR_TITLE="${{ github.event.pull_request.title }}" | |
| REQUIRED_PREFIX="Release: Bump version to" | |
| if [[ ! "$PR_TITLE" == "$REQUIRED_PREFIX"* ]]; then | |
| echo "::error::PR title does not start with \"$REQUIRED_PREFIX\"" | |
| echo "Current PR title: \"$PR_TITLE\"" | |
| exit 1 | |
| fi | |
| echo "PR title check passed." | |
| - name: Approve a PR | |
| run: gh pr review --approve "$PR_URL" | |
| env: | |
| PR_URL: ${{github.event.pull_request.html_url}} | |
| GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}} | |
| # Enable for automerge | |
| - name: Enable auto-merge for Dependabot PRs | |
| run: gh pr merge --auto --merge "$PR_URL" | |
| env: | |
| PR_URL: ${{github.event.pull_request.html_url}} | |
| GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}} |