Skip to content

Commit

Permalink
ci: restrict only admin user can run slash commands workflow (#604)
Browse files Browse the repository at this point in the history
Signed-off-by: Lin Yang <[email protected]>
  • Loading branch information
reaver-flomesh authored Dec 31, 2024
1 parent 6d0313f commit d394d89
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion .github/workflows/slash-commands.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,16 @@ jobs:
run:
runs-on: ubuntu-latest
steps:
- uses: wow-actions/slash-commands@v1
- name: Check user permission
id: check
uses: scherermichael-oss/action-has-permission@master
with:
required-permission: admin
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Execute slash command
if: steps.check.outputs.has-permission
uses: wow-actions/slash-commands@v1
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
CONFIG_FILE: .github/slash-commands-config.yml

0 comments on commit d394d89

Please sign in to comment.