Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add !redeploy Comment Command #176

Merged
merged 9 commits into from
Dec 10, 2024
14 changes: 13 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -127,11 +127,23 @@ jobs:
# String to describe the overall check
commit-status-description: ${{ steps.commit-status-args.outputs.description }}
steps:
- name: Check commenter permissions
id: commenter
uses: access-nri/actions/.github/actions/commenter-permission-check@main
with:
minimum-permission: write
CodeGat marked this conversation as resolved.
Show resolved Hide resolved

- name: React to Comment
uses: access-nri/actions/.github/actions/react-to-comment@main
with:
token: ${{ github.token }}
reaction: rocket
reaction: ${{ steps.commenter.outputs.has-permission == 'true' && 'rocket' || '-1' }}

- name: Exit if no write permissions
if: steps.commenter.outputs.has-permission == 'false'
run: |
echo "User ${{ github.event.comment.user.login }} doesn't have 'write' permission on ${{ github.repository }}, not allowing deployment"
exit 1

- name: Set Commit Status Args
id: commit-status-args
Expand Down