Skip to content

Commit

Permalink
Merge pull request aws#157 from spring1843/rm/command-maintainer-check
Browse files Browse the repository at this point in the history
Rm/command maintainer check
  • Loading branch information
spring1843 authored Jan 31, 2023
2 parents 51443dc + 38ef989 commit 0e15406
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 1 deletion.
15 changes: 15 additions & 0 deletions .github/actions/maintainer-check/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
name: MaintainerCheck
description: 'Checks against maintainers and fail if no match'
inputs:
username: # id of input
description: 'Username to be checked'
required: true
runs:
using: "composite"
steps:
- uses: aws-actions/configure-aws-credentials@v1-node16
with:
if: !containers("tzneal,spring1843,ellistarn,akestner,bwagner5,billrayburn,suket22,njtran,chrisnegus,jonathan-innis,rtripat,engedaam",${{ inputs.username }})
run:
echo "not a maintainer"
exit 1
7 changes: 6 additions & 1 deletion .github/workflows/approval-comment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,18 @@ on:

jobs:
approval-comment:
if: github.repository == 'aws/karpenter' && github.event.review.state == 'approved' && startsWith(github.event.review.body ,'/karpenter snapshot')
if: github.repository == 'spring1843/karpenter' && github.event.review.state == 'approved' && startsWith(github.event.review.body ,'/karpenter snapshot')
permissions: write-all
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Dump context
uses: crazy-max/ghaction-dump-context@v1
- uses: ./.github/actions/maintainer-check
with:
username: ${{ github.event.review.sender }}
- name: Save info about the review comment as an artifact for other workflows that run on workflow_run to download them
run: |
mkdir -p /tmp/artifacts
Expand Down

0 comments on commit 0e15406

Please sign in to comment.