Skip to content

Commit

Permalink
feat: run bot workflow only if organisation member
Browse files Browse the repository at this point in the history
  • Loading branch information
leosayous21 committed Jul 9, 2023
1 parent 2ce732e commit f009c9d
Showing 1 changed file with 6 additions and 8 deletions.
14 changes: 6 additions & 8 deletions .github/workflows/create-app.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,18 +9,16 @@ jobs:
runs-on: ubuntu-latest
if: contains(github.event.comment.body, '/create-app')
steps:
- name: Check if organization member
- name: Check if sismo-core organisation member
id: is_organization_member
uses: jamessingleton/[email protected].1
uses: jamessingleton/[email protected].0
with:
organization: sismo-core
username: ${{ github.event.comment.user.login }}
organization: "sismo-core"
username: ${{ github.actor }}
token: ${{ secrets.GITHUB_TOKEN }}

- if: steps.is_organization_member.outputs.result == false
run: |
echo "${{ github.actor }} does not belong to sismo-core"
exit 1
- if: steps.is_organization_member.outputs.result != 'true'
run: exit 1

- name: Checkout code
uses: actions/checkout@v3
Expand Down

0 comments on commit f009c9d

Please sign in to comment.