From d8c8c03cb0ba70e8e24b079b828ef7ba56af0dd3 Mon Sep 17 00:00:00 2001 From: Frederic BIDON Date: Mon, 22 Jun 2026 19:38:31 +0200 Subject: [PATCH] ci: post README announcements to discord + bump ci-workflows to v0.4.0 Add the webhook-announcements workflow (mirrors go-openapi/testify): pushes to master that change README.md are scanned for new "## Announcements" entries and posted to the discord channel. Also bump all ci-workflows shared-workflow pins to v0.4.0 (af4c93f45481ea7d24ac2a9858272cc03daf424e). Co-Authored-By: Claude Opus 4.8 (1M context) Signed-off-by: Frederic BIDON --- .github/workflows/auto-merge.yml | 2 +- .github/workflows/bump-release.yml | 2 +- .github/workflows/codeql.yml | 2 +- .github/workflows/contributors.yml | 2 +- .github/workflows/go-test.yml | 2 +- .github/workflows/monitor-bot-pr.yml | 2 +- .github/workflows/scanner.yml | 2 +- .github/workflows/skipauth-test.yml | 2 +- .github/workflows/tag-release.yml | 2 +- .github/workflows/webhook-announcements.yml | 60 +++++++++++++++++++++ 10 files changed, 69 insertions(+), 9 deletions(-) create mode 100644 .github/workflows/webhook-announcements.yml diff --git a/.github/workflows/auto-merge.yml b/.github/workflows/auto-merge.yml index 4aa5830d..c3377a63 100644 --- a/.github/workflows/auto-merge.yml +++ b/.github/workflows/auto-merge.yml @@ -11,5 +11,5 @@ jobs: permissions: contents: write pull-requests: write - uses: go-openapi/ci-workflows/.github/workflows/auto-merge.yml@f00f5763ddb0c59105de5f565da8cac323fce2bf # v0.3.5 + uses: go-openapi/ci-workflows/.github/workflows/auto-merge.yml@af4c93f45481ea7d24ac2a9858272cc03daf424e # v0.4.0 secrets: inherit diff --git a/.github/workflows/bump-release.yml b/.github/workflows/bump-release.yml index 4d4fef6a..abff69bc 100644 --- a/.github/workflows/bump-release.yml +++ b/.github/workflows/bump-release.yml @@ -32,7 +32,7 @@ jobs: permissions: contents: write pull-requests: write - uses: go-openapi/ci-workflows/.github/workflows/bump-release-monorepo.yml@f00f5763ddb0c59105de5f565da8cac323fce2bf # v0.3.5 + uses: go-openapi/ci-workflows/.github/workflows/bump-release-monorepo.yml@af4c93f45481ea7d24ac2a9858272cc03daf424e # v0.4.0 with: bump-type: ${{ inputs.bump-type }} tag-message-title: ${{ inputs.tag-message-title }} diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml index f2f8f687..b48a31f9 100644 --- a/.github/workflows/codeql.yml +++ b/.github/workflows/codeql.yml @@ -18,5 +18,5 @@ jobs: permissions: contents: read security-events: write - uses: go-openapi/ci-workflows/.github/workflows/codeql.yml@f00f5763ddb0c59105de5f565da8cac323fce2bf # v0.3.5 + uses: go-openapi/ci-workflows/.github/workflows/codeql.yml@af4c93f45481ea7d24ac2a9858272cc03daf424e # v0.4.0 secrets: inherit diff --git a/.github/workflows/contributors.yml b/.github/workflows/contributors.yml index 83d9ae8c..d92e1f69 100644 --- a/.github/workflows/contributors.yml +++ b/.github/workflows/contributors.yml @@ -14,5 +14,5 @@ jobs: permissions: pull-requests: write contents: write - uses: go-openapi/ci-workflows/.github/workflows/contributors.yml@f00f5763ddb0c59105de5f565da8cac323fce2bf # v0.3.5 + uses: go-openapi/ci-workflows/.github/workflows/contributors.yml@af4c93f45481ea7d24ac2a9858272cc03daf424e # v0.4.0 secrets: inherit diff --git a/.github/workflows/go-test.yml b/.github/workflows/go-test.yml index e70946f4..bb6d7485 100644 --- a/.github/workflows/go-test.yml +++ b/.github/workflows/go-test.yml @@ -13,5 +13,5 @@ on: jobs: test: - uses: go-openapi/ci-workflows/.github/workflows/go-test-monorepo.yml@f00f5763ddb0c59105de5f565da8cac323fce2bf # v0.3.5 + uses: go-openapi/ci-workflows/.github/workflows/go-test-monorepo.yml@af4c93f45481ea7d24ac2a9858272cc03daf424e # v0.4.0 secrets: inherit diff --git a/.github/workflows/monitor-bot-pr.yml b/.github/workflows/monitor-bot-pr.yml index 8e8190d7..3e5e18ea 100644 --- a/.github/workflows/monitor-bot-pr.yml +++ b/.github/workflows/monitor-bot-pr.yml @@ -14,5 +14,5 @@ jobs: contents: write pull-requests: write statuses: read - uses: go-openapi/ci-workflows/.github/workflows/monitor-bot-pr.yml@2e57e83146e049b5dfb8116ba16a09b2da27b3c5 # v0.3.3 + uses: go-openapi/ci-workflows/.github/workflows/monitor-bot-pr.yml@af4c93f45481ea7d24ac2a9858272cc03daf424e # v0.4.0 secrets: inherit diff --git a/.github/workflows/scanner.yml b/.github/workflows/scanner.yml index 1a869a4e..49969ae6 100644 --- a/.github/workflows/scanner.yml +++ b/.github/workflows/scanner.yml @@ -15,5 +15,5 @@ jobs: permissions: contents: read security-events: write - uses: go-openapi/ci-workflows/.github/workflows/scanner.yml@f00f5763ddb0c59105de5f565da8cac323fce2bf # v0.3.5 + uses: go-openapi/ci-workflows/.github/workflows/scanner.yml@af4c93f45481ea7d24ac2a9858272cc03daf424e # v0.4.0 secrets: inherit diff --git a/.github/workflows/skipauth-test.yml b/.github/workflows/skipauth-test.yml index 873d2726..5d40bad3 100644 --- a/.github/workflows/skipauth-test.yml +++ b/.github/workflows/skipauth-test.yml @@ -47,5 +47,5 @@ jobs: collect-coverage: needs: [unsafe-skipauth-test] if: ${{ !cancelled() && needs.unsafe-skipauth-test.result == 'success' }} - uses: go-openapi/ci-workflows/.github/workflows/collect-coverage.yml@f00f5763ddb0c59105de5f565da8cac323fce2bf # v0.3.5 + uses: go-openapi/ci-workflows/.github/workflows/collect-coverage.yml@af4c93f45481ea7d24ac2a9858272cc03daf424e # v0.4.0 secrets: inherit diff --git a/.github/workflows/tag-release.yml b/.github/workflows/tag-release.yml index f65ea632..8b948f63 100644 --- a/.github/workflows/tag-release.yml +++ b/.github/workflows/tag-release.yml @@ -13,7 +13,7 @@ jobs: name: Create release permissions: contents: write - uses: go-openapi/ci-workflows/.github/workflows/release.yml@f00f5763ddb0c59105de5f565da8cac323fce2bf # v0.3.5 + uses: go-openapi/ci-workflows/.github/workflows/release.yml@af4c93f45481ea7d24ac2a9858272cc03daf424e # v0.4.0 with: tag: ${{ github.ref_name }} is-monorepo: true diff --git a/.github/workflows/webhook-announcements.yml b/.github/workflows/webhook-announcements.yml new file mode 100644 index 00000000..a21bb820 --- /dev/null +++ b/.github/workflows/webhook-announcements.yml @@ -0,0 +1,60 @@ +name: Webhook Announcements + +# invoke the common webhook-announcements workflow, scanning README. +# +# Two modes: +# +# * push: diff on "## Announcements" section exercises the +# real before..after detection and post to discord channel. +# +# * workflow_dispatch: a manual live run. Optionally provide an arbitrary webhook URL and +# it POSTs for real. By default it diffs against the git empty tree, so every +# announcement currently in the fixture is posted — no need to craft a diff. +# +# NOTE: the webhook URL you type is a workflow_dispatch input and is therefore +# visible in the run's UI/logs. Use a throwaway test webhook (and/or rotate it +# afterwards), not the production go-openapi webhook. + +permissions: + contents: read + +on: + push: + branches: + - master + paths: + - 'README.md' + + workflow_dispatch: + inputs: + webhook-url: + description: | + Webhook URL to POST to (e.g. a test Discord channel webhook). + Visible in run logs — use a throwaway webhook. + type: string + default: '' + compare-base: + description: | + Git ref to diff the fixture against. The default empty-tree SHA posts + every announcement currently in the fixture. + type: string + default: "" + dry-run: + description: | + Print payloads instead of posting. + type: choice + options: + - 'false' + - 'true' + default: 'false' + +jobs: + announce: + uses: go-openapi/ci-workflows/.github/workflows/webhook-announcements.yml@af4c93f45481ea7d24ac2a9858272cc03daf424e # v0.4.0 + with: + scanned-markdown: README.md + # On push: normal before..after diff (empty + # compare-base). On dispatch: honor the provided inputs. + dry-run: ${{ github.event_name == 'workflow_dispatch' && inputs.dry-run || 'false' }} + compare-base: ${{ github.event_name == 'workflow_dispatch' && inputs.compare-base || '' }} + secrets: inherit