Skip to content

Commit

Permalink
Merge pull request #3 from jbranchaud/jb/add-script-to-dispatch-repo
Browse files Browse the repository at this point in the history
Script to issue curl command to dispatch repo
  • Loading branch information
jbranchaud committed Jun 12, 2023
2 parents 3b743a2 + d8eb204 commit 83d37e8
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
.env.local
15 changes: 15 additions & 0 deletions send-repo-dispatch.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
#!/bin/bash

# Load environment variables from .env.local file
export $(egrep -v '^#' .env.local | xargs)

# Now you can use the environment variable in your CURL command
curl -L \
-X POST \
-H "Accept: application/vnd.github+json" \
-H "Authorization: Bearer $GITHUB_ACCESS_TOKEN"\
-H "X-GitHub-Api-Version: 2022-11-28" \
https://api.github.com/repos/jbranchaud/github-actions-experiment/dispatches \
-d '{"event_type":"on-demand-test","client_payload":{"unit":false,"integration":true}}'

echo 'end of script'

0 comments on commit 83d37e8

Please sign in to comment.