NYT Webhook #361
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
# This is a basic workflow to help you get started with Actions | |
name: NYT Webhook | |
# Controls when the workflow will run | |
on: | |
# Allows you to run this workflow manually from the Actions tab | |
workflow_dispatch: | |
schedule: | |
- cron: '00 02 * * *' | |
# A workflow run is made up of one or more jobs that can run sequentially or in parallel | |
jobs: | |
ping_nyt: | |
# The type of runner that the job will run on | |
runs-on: ubuntu-22.04 | |
env: | |
webhook_url: ${{ secrets.NYT_WEBHOOK }} | |
# Steps represent a sequence of tasks that will be executed as part of the job | |
steps: | |
- name: ping | |
run: | | |
date --utc "+%b %d, %Y" | xargs -I '{}' curl ${{ env.webhook_url }} -H "Content-Type: application/json" -d '{"Date": "'{}'" }' | |