From 23ade3369f7d66644f52031459010bc8bdb763a8 Mon Sep 17 00:00:00 2001 From: Roomote Date: Wed, 15 Jul 2026 11:48:31 +0000 Subject: [PATCH 1/2] chore: add weekly Discord release reminder --- .github/workflows/release-reminder.yml | 46 ++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 .github/workflows/release-reminder.yml diff --git a/.github/workflows/release-reminder.yml b/.github/workflows/release-reminder.yml new file mode 100644 index 0000000000..611036c1b0 --- /dev/null +++ b/.github/workflows/release-reminder.yml @@ -0,0 +1,46 @@ +name: Post weekly release reminder + +on: + schedule: + # Friday at 09:00 UTC + - cron: "0 9 * * 5" + workflow_dispatch: + +permissions: {} + +jobs: + remind: + runs-on: ubuntu-latest + steps: + - name: Post release reminder to Discord + env: + DISCORD_RELEASE_WEBHOOK_URL: ${{ secrets.DISCORD_RELEASE_WEBHOOK_URL }} + run: | + owners=("Elliott" "Navad" "Toray") + anchor_date="2026-07-17" + seconds_since_anchor=$(($(date -u +%s) - $(date -u -d "$anchor_date" +%s))) + weeks_since_anchor=$((seconds_since_anchor / 604800)) + owner="${owners[$((weeks_since_anchor % ${#owners[@]}))]}" + + message=$(cat < Date: Wed, 15 Jul 2026 23:49:09 +0000 Subject: [PATCH 2/2] ci(release-reminder): add concurrency guard, failure notification, and shell hardening --- .github/workflows/release-reminder.yml | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/.github/workflows/release-reminder.yml b/.github/workflows/release-reminder.yml index 611036c1b0..6f5b6b8ea6 100644 --- a/.github/workflows/release-reminder.yml +++ b/.github/workflows/release-reminder.yml @@ -1,5 +1,8 @@ name: Post weekly release reminder +# Requires repo secret DISCORD_RELEASE_WEBHOOK_URL — Discord webhook for the +# release-reminders channel. The reminder job fails (noisily) if it is unset. + on: schedule: # Friday at 09:00 UTC @@ -8,6 +11,12 @@ on: permissions: {} +concurrency: + group: release-reminder + # A re-run produces an identical message, so cancel a stale/duplicate run + # rather than risk posting twice. + cancel-in-progress: true + jobs: remind: runs-on: ubuntu-latest @@ -16,6 +25,7 @@ jobs: env: DISCORD_RELEASE_WEBHOOK_URL: ${{ secrets.DISCORD_RELEASE_WEBHOOK_URL }} run: | + set -euo pipefail owners=("Elliott" "Navad" "Toray") anchor_date="2026-07-17" seconds_since_anchor=$(($(date -u +%s) - $(date -u -d "$anchor_date" +%s))) @@ -44,3 +54,15 @@ jobs: --header 'Content-Type: application/json' \ --data "$payload" \ "$DISCORD_RELEASE_WEBHOOK_URL" + + - name: Notify on failure + if: failure() + env: + DISCORD_RELEASE_WEBHOOK_URL: ${{ secrets.DISCORD_RELEASE_WEBHOOK_URL }} + run: | + set -euo pipefail + payload=$(jq -nc --arg content "⚠️ release-reminder workflow failed — see the Actions runs." '{content: $content}') + curl --fail-with-body --silent --show-error \ + --header 'Content-Type: application/json' \ + --data "$payload" \ + "$DISCORD_RELEASE_WEBHOOK_URL" || true