Skip to content

Commit 6c5c9de

Browse files
chore: add discourse-notify-and-readme-sync.yml
1 parent 1959c70 commit 6c5c9de

1 file changed

Lines changed: 43 additions & 0 deletions

File tree

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
name: Notify Discourse and sync README
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
- master
8+
9+
jobs:
10+
bootstrap:
11+
uses: stape-io/template-changes-shared-workflows/.github/workflows/discourse-bootstrap.yml@main
12+
permissions:
13+
contents: write
14+
secrets: inherit
15+
16+
check-changes:
17+
uses: stape-io/template-changes-shared-workflows/.github/workflows/check-changes.yml@main
18+
permissions:
19+
contents: write
20+
21+
notify-template-change:
22+
needs: [bootstrap, check-changes]
23+
if: needs.check-changes.outputs.template_changed == 'true'
24+
uses: stape-io/template-changes-shared-workflows/.github/workflows/discourse-notify.yml@main
25+
permissions:
26+
contents: read
27+
models: read
28+
with:
29+
before_sha: ${{ github.event.before }}
30+
head_sha: ${{ github.sha }}
31+
commit_url: ${{ needs.check-changes.outputs.commit_url }}
32+
topic_id: ${{ needs.bootstrap.outputs.topic_id }}
33+
secrets: inherit
34+
35+
sync-readme:
36+
needs: [bootstrap, check-changes]
37+
if: needs.check-changes.outputs.readme_changed == 'true'
38+
uses: stape-io/template-changes-shared-workflows/.github/workflows/discourse-readme-sync.yml@main
39+
permissions:
40+
contents: read
41+
with:
42+
post_id: ${{ needs.bootstrap.outputs.post_id }}
43+
secrets: inherit

0 commit comments

Comments
 (0)