-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Script to issue curl command to dispatch repo
Include a .gitignore file that keeps the `.env.local` file from being committed.
- Loading branch information
1 parent
3b743a2
commit d8eb204
Showing
2 changed files
with
16 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
.env.local |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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' |