Skip to content

Commit 0226a4d

Browse files
authored
Add slack notification upon release published (#260)
* Workflow: Add slack notification upon release published * Workflow: Corrected owner env * Workflow: Updated PAT name * Workflow: Removed slack notification and moved to documentation repo
1 parent c737be5 commit 0226a4d

File tree

2 files changed

+24
-3
lines changed

2 files changed

+24
-3
lines changed

.github/workflows/build-push.yml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,6 @@
11
name: build preview
22

33
on:
4-
release:
5-
types:
6-
- published
74
pull_request:
85
branches:
96
- "*"

.github/workflows/release-build.yml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
name: Build preview on documentation repo upon release publish
2+
3+
on:
4+
release:
5+
types:
6+
- published
7+
8+
env:
9+
OWNER: nginx
10+
REPO: documentation
11+
12+
jobs:
13+
trigger-documentation-build:
14+
runs-on: ubuntu-latest
15+
steps:
16+
- name: Trigger 'Build and deploy' workflow in 'documentation' repo
17+
run: |
18+
curl -L \
19+
-X POST \
20+
-H "Accept: application/vnd.github+json" \
21+
-H "Authorization: Bearer ${{ secrets.DOCUMENTATION_SLACK_FLOW_PAT }}" \
22+
-H "X-GitHub-Api-Version: 2022-11-28" \
23+
"https://api.github.com/repos/${{ env.OWNER }}/${{ env.REPO }}/dispatches" \
24+
-d "{\"event_type\": \"trigger-preview-build\", \"client_payload\": {\"environment\": \"preview\", \"hugo_theme_override\": \"\", \"author\": \"${{ github.event.release.author.login }}\", \"tag_name\": \"${{ github.event.release.tag_name }}\", \"release_name\": \"${{ github.event.release.name }}\"}}"

0 commit comments

Comments
 (0)