ldelossa/remove-from-groups #13
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: Team Updates | |
on: | |
# enable manual trigger via github actions interface | |
workflow_dispatch: | |
# trigger on push to main branch | |
push: | |
branches: | |
- main | |
jobs: | |
# Send a cross-repository workflow dispatch request to the team-management repo | |
# Team management repo workflow will take action on event_type community_teams_update | |
dispatch-team-management: | |
if: github.repository == 'cilium/community' | |
name: Dispatch Team Management | |
runs-on: ubuntu-latest | |
environment: team-management | |
steps: | |
# Send the workflow dispatch event via GitHUB API | |
- name: Dispatch workflow request | |
run: | | |
curl --fail-with-body -L -XPOST -H "Accept: application/vnd.github+json" -H "Authorization: Bearer ${{secrets.TM_DISPATCH_TOKEN}}" -H "X-GitHub-Api-Version: 2022-11-28" https://api.github.com/repos/cilium/team-management/dispatches -d '{"event_type":"community_teams_update"}' |