Skip to content

Commit

Permalink
add dispatch check
Browse files Browse the repository at this point in the history
  • Loading branch information
rezrah committed Dec 5, 2024
1 parent 427d3d7 commit a4d32cf
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions .github/workflows/new_release_issue.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,22 @@ name: Create new release issue

on:
workflow_dispatch:
release:
types: [published]
repository_dispatch:
types: [new-release-created]

jobs:
create-issue:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Verify webhook secret
if: github.event_name == 'repository_dispatch' && github.event.action == 'new-release-created'
id: verify_secret
run: |
if [ "${{ github.event.client_payload.secret }}" != "${{ secrets.WEBHOOK_SECRET }}" ]; then
echo "Invalid secret"
exit 1
fi
- name: Get latest release
id: get_latest_release
uses: actions/github-script@v7
Expand Down

0 comments on commit a4d32cf

Please sign in to comment.