This commit is contained in:
Ben Broderick Phillips 2022-05-18 19:54:33 -04:00
Родитель 2d2d84ffa3
Коммит 606e7ebef2
2 изменённых файлов: 17 добавлений и 1 удалений

Просмотреть файл

@ -13,7 +13,7 @@ Check Enforcer is our solution. We use the built-in triggering w/ path filter op
## Enabling Check Enforcer for a Repository
1. Copy the following workflow files into your repo and check them into the main branch:
- `.github/workflows/event.yaml`
- `../example-workflow.yaml` ([link](https://github.com/Azure/azure-sdk-actions/blob/main/example-workflow.yaml))
1. Create a pull request so that one of the above actions will run and post a status.
1. Add a new branch protection rule in your repository settings: `https://github.com/<org>/<repo>/settings/branches`
- Enter the default branch or desired branch name pattern.

16
example-workflow.yaml Normal file
Просмотреть файл

@ -0,0 +1,16 @@
name: GitHub Event Handler
on:
check_suite:
types: [completed]
issue_comment:
types: [created]
jobs:
event-handler:
name: ${{ github.event_name }}
runs-on: ubuntu-latest
steps:
- uses: azure/azure-sdk-actions@main
with:
token: ${{ secrets.GITHUB_TOKEN }}