Skip to content

Commit 1bdadef

Browse files
fredbiclaude
andauthored
ci: post README announcements to discord + bump ci-workflows to v0.4.0 (#139)
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). Signed-off-by: Frederic BIDON <fredbi@yahoo.com> Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
1 parent a7dbc8a commit 1bdadef

9 files changed

Lines changed: 68 additions & 8 deletions

File tree

.github/workflows/auto-merge.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,5 +11,5 @@ jobs:
1111
permissions:
1212
contents: write
1313
pull-requests: write
14-
uses: go-openapi/ci-workflows/.github/workflows/auto-merge.yml@f00f5763ddb0c59105de5f565da8cac323fce2bf # v0.3.5
14+
uses: go-openapi/ci-workflows/.github/workflows/auto-merge.yml@af4c93f45481ea7d24ac2a9858272cc03daf424e # v0.4.0
1515
secrets: inherit

.github/workflows/bump-release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ jobs:
3030
bump-release:
3131
permissions:
3232
contents: write
33-
uses: go-openapi/ci-workflows/.github/workflows/bump-release.yml@f00f5763ddb0c59105de5f565da8cac323fce2bf # v0.3.5
33+
uses: go-openapi/ci-workflows/.github/workflows/bump-release.yml@af4c93f45481ea7d24ac2a9858272cc03daf424e # v0.4.0
3434
with:
3535
bump-type: ${{ inputs.bump-type }}
3636
tag-message-title: ${{ inputs.tag-message-title }}

.github/workflows/codeql.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,5 +18,5 @@ jobs:
1818
permissions:
1919
contents: read
2020
security-events: write
21-
uses: go-openapi/ci-workflows/.github/workflows/codeql.yml@f00f5763ddb0c59105de5f565da8cac323fce2bf # v0.3.5
21+
uses: go-openapi/ci-workflows/.github/workflows/codeql.yml@af4c93f45481ea7d24ac2a9858272cc03daf424e # v0.4.0
2222
secrets: inherit

.github/workflows/contributors.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,5 +14,5 @@ jobs:
1414
permissions:
1515
pull-requests: write
1616
contents: write
17-
uses: go-openapi/ci-workflows/.github/workflows/contributors.yml@f00f5763ddb0c59105de5f565da8cac323fce2bf # v0.3.5
17+
uses: go-openapi/ci-workflows/.github/workflows/contributors.yml@af4c93f45481ea7d24ac2a9858272cc03daf424e # v0.4.0
1818
secrets: inherit

.github/workflows/go-test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,5 +13,5 @@ on:
1313

1414
jobs:
1515
test:
16-
uses: go-openapi/ci-workflows/.github/workflows/go-test.yml@f00f5763ddb0c59105de5f565da8cac323fce2bf # v0.3.5
16+
uses: go-openapi/ci-workflows/.github/workflows/go-test.yml@af4c93f45481ea7d24ac2a9858272cc03daf424e # v0.4.0
1717
secrets: inherit

.github/workflows/monitor-bot-pr.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,5 +14,5 @@ jobs:
1414
contents: write
1515
pull-requests: write
1616
statuses: read
17-
uses: go-openapi/ci-workflows/.github/workflows/monitor-bot-pr.yml@2e57e83146e049b5dfb8116ba16a09b2da27b3c5 # v0.3.3
17+
uses: go-openapi/ci-workflows/.github/workflows/monitor-bot-pr.yml@af4c93f45481ea7d24ac2a9858272cc03daf424e # v0.4.0
1818
secrets: inherit

.github/workflows/scanner.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,5 +15,5 @@ jobs:
1515
permissions:
1616
contents: read
1717
security-events: write
18-
uses: go-openapi/ci-workflows/.github/workflows/scanner.yml@f00f5763ddb0c59105de5f565da8cac323fce2bf # V0.1.1
18+
uses: go-openapi/ci-workflows/.github/workflows/scanner.yml@af4c93f45481ea7d24ac2a9858272cc03daf424e # v0.4.0
1919
secrets: inherit

.github/workflows/tag-release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ jobs:
1313
name: Create release
1414
permissions:
1515
contents: write
16-
uses: go-openapi/ci-workflows/.github/workflows/release.yml@f00f5763ddb0c59105de5f565da8cac323fce2bf # v0.3.5
16+
uses: go-openapi/ci-workflows/.github/workflows/release.yml@af4c93f45481ea7d24ac2a9858272cc03daf424e # v0.4.0
1717
with:
1818
tag: ${{ github.ref_name }}
1919
secrets: inherit
Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
name: Webhook Announcements
2+
3+
# invoke the common webhook-announcements workflow, scanning README.
4+
#
5+
# Two modes:
6+
#
7+
# * push: diff on "## Announcements" section exercises the
8+
# real before..after detection and post to discord channel.
9+
#
10+
# * workflow_dispatch: a manual live run. Optionally provide an arbitrary webhook URL and
11+
# it POSTs for real. By default it diffs against the git empty tree, so every
12+
# announcement currently in the fixture is posted — no need to craft a diff.
13+
#
14+
# NOTE: the webhook URL you type is a workflow_dispatch input and is therefore
15+
# visible in the run's UI/logs. Use a throwaway test webhook (and/or rotate it
16+
# afterwards), not the production go-openapi webhook.
17+
18+
permissions:
19+
contents: read
20+
21+
on:
22+
push:
23+
branches:
24+
- master
25+
paths:
26+
- 'README.md'
27+
28+
workflow_dispatch:
29+
inputs:
30+
webhook-url:
31+
description: |
32+
Webhook URL to POST to (e.g. a test Discord channel webhook).
33+
Visible in run logs — use a throwaway webhook.
34+
type: string
35+
default: ''
36+
compare-base:
37+
description: |
38+
Git ref to diff the fixture against. The default empty-tree SHA posts
39+
every announcement currently in the fixture.
40+
type: string
41+
default: ""
42+
dry-run:
43+
description: |
44+
Print payloads instead of posting.
45+
type: choice
46+
options:
47+
- 'false'
48+
- 'true'
49+
default: 'false'
50+
51+
jobs:
52+
announce:
53+
uses: go-openapi/ci-workflows/.github/workflows/webhook-announcements.yml@af4c93f45481ea7d24ac2a9858272cc03daf424e # v0.4.0
54+
with:
55+
scanned-markdown: README.md
56+
# On push: normal before..after diff (empty
57+
# compare-base). On dispatch: honor the provided inputs.
58+
dry-run: ${{ github.event_name == 'workflow_dispatch' && inputs.dry-run || 'false' }}
59+
compare-base: ${{ github.event_name == 'workflow_dispatch' && inputs.compare-base || '' }}
60+
secrets: inherit

0 commit comments

Comments
 (0)