CURL Request with Secrets #10
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
name: CURL Request with Secrets | |
on: | |
schedule: | |
- cron: '*/5 * * * *' | |
jobs: | |
notify: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Set environment variable from GitHub secret | |
shell: bash | |
env: | |
REQ_SECRET: ${{ secrets.REQ_SECRET }} | |
run: echo "REQ_SECRET=$REQ_SECRET" >> $GITHUB_ENV | |
- name: Verify secret loads correctly | |
shell: bash | |
run: echo $REQ_SECRET | |
- name: Send POST request | |
# Inspect requests at https://public.requestbin.com/r/enw9z3kw0afbh | |
shell: bash | |
run: | | |
curl -H "Authorization: $REQ_SECRET" -X POST "https://enw9z3kw0afbh.x.pipedream.net" | |