build(deps): bump github.com/nats-io/nats-server/v2 from 2.10.20 to 2.10.22 #1038
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: Trigger on Comment | |
on: | |
issue_comment: | |
types: [created, edited] | |
jobs: | |
trigger-workflows: | |
if: github.event.issue.pull_request && contains(github.event.comment.body, '/oktotest') | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check if commenter is authorized | |
id: check-authorization | |
shell: bash | |
run: | | |
set -euo pipefail | |
COMMENTER=$(jq --raw-output .comment.user.login "$GITHUB_EVENT_PATH") | |
APPROVERS=$(yq e '.approvers[]' OWNERS) | |
if echo "$APPROVERS" | grep -Fxq "$COMMENTER"; then | |
echo "::set-output name=authorized::true" | |
else | |
echo "::set-output name=authorized::false" | |
fi | |
- name: Dispatch event | |
if: steps.check-authorization.outputs.authorized == 'true' | |
uses: peter-evans/repository-dispatch@v3 | |
with: | |
token: ${{ secrets.GITHUB_TOKEN }} | |
event-type: ok-to-test |