Scheduling infrastructure for absolutely everyone.
chore: Add workflow to post security advisories to Slack (#21383)
Alex van Andelf387fdb166ac
diff --git a/.github/workflows/advisories-to-slack.yml b/.github/workflows/advisories-to-slack.ymlnew file mode 100644index 00000000000..200dd01bd5d--- /dev/null+++ b/.github/workflows/advisories-to-slack.yml@@ -0,0 +1,23 @@+name: Notify New Security Advisories++on:+ schedule:+ - cron: '0 * * * *'+ workflow_dispatch:++jobs:+ notify:+ runs-on: ubuntu-latest+ steps:+ - name: Fetch advisories and send to Slack+ env:+ GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}+ SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK_SECURITY_ADVISORIES }}+ run: |+ curl -s -H "Authorization: token $GH_TOKEN" \+ https://api.github.com/repos/calcom/cal.com/security-advisories \+ | jq -r '.[] | select(.state=="published") | "\(.summary)\n\(.url)"' \+ | while read -r msg; do+ [ -n "$msg" ] && curl -X POST -H 'Content-type: application/json' \+ --data "{\"text\":\"$msg\"}" "$SLACK_WEBHOOK"+ done