push instead #2
Workflow file for this run
This file contains hidden or 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
on: | |
schedule: | |
- cron: "0 12 * * *" # Once per day | |
push: | |
jobs: | |
archive: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- run: | | |
curl --fail https://stats.filspark.com/participants/top-measurements?from=yesterday&to=yesterday > `date '+%Y-%m-%d'`.json | |
- uses: EndBug/add-and-commit@v9 | |
- if: failure() | |
uses: slackapi/slack-github-action@v1.27.0 | |
with: | |
channel-id: alerts | |
payload: | | |
{ | |
"text": "Top measurements archival failed", | |
"blocks": [ | |
{ | |
"type": "section", | |
"text": { | |
"type": "mrkdwn", | |
"text": ":warning: *<${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}|Top measurements archival failed>*" | |
} | |
} | |
] | |
} | |
env: | |
SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }} |