Skip to content

CURL Request with Secrets #10

CURL Request with Secrets

CURL Request with Secrets #10

Workflow file for this run

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"