Skip to content

Commit

Permalink
Create test-dispatch.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
GuySartorelli authored Aug 6, 2024
1 parent 3edfddc commit 6eb1324
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions .github/workflows/test-dispatch.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
on:
workflow_dispatch:

jobs:
dispatch:
runs-on: ubuntu-latest
steps:
- name: Check for file
env:
GITHUB_REPOSITORY: ${{ github.repository }}
BRANCH: ${{ github.ref_name }}
shell: bash
run: |
RESP_CODE=$(curl -w %{http_code} -s -L -o __response.json \
-X POST \
-H "Accept: application/vnd.github+json" \
-H "Authorization: Bearer ${{ github.token }}"\
-H "X-GitHub-Api-Version: 2022-11-28" \
https://api.github.com/repos/$GITHUB_REPOSITORY/actions/workflows/test-checkout.yml/dispatches \
-d "{\"ref\":\"$BRANCH\"}"
)
echo "RESP_CODE is $RESP_CODE"

0 comments on commit 6eb1324

Please sign in to comment.