Skip to content

Commit

Permalink
Script to issue curl command to dispatch repo
Browse files Browse the repository at this point in the history
Include a .gitignore file that keeps the `.env.local` file from being
committed.
  • Loading branch information
jbranchaud committed Jun 12, 2023
1 parent 3b743a2 commit d8eb204
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 d8eb204

Please sign in to comment.