Skip to content

Commit f9e37f7

Browse files
committed
feat: Add additional job to trigger slack notification
1 parent 533b5a7 commit f9e37f7

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

.github/workflows/build-push.yml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,25 @@ jobs:
7373
AZURE_CREDENTIALS: ${{secrets.AZURE_CREDENTIALS_DOCS}}
7474
AZURE_KEY_VAULT: ${{secrets.AZURE_KEY_VAULT_DOCS}}
7575

76+
trigger-theme-slack-notification:
77+
if: github.event_name == 'repository_dispatch'
78+
needs: call-docs-build-push
79+
runs-on: ubuntu-latest
80+
steps:
81+
- name: Trigger 'Slack notification for new theme release' workflow in 'nginx-hugo-theme' repo.
82+
run: |
83+
event_type="trigger-slack-notification"
84+
curl -L \
85+
-X POST \
86+
-H "Accept: application/vnd.github+json" \
87+
-H "Authorization: Bearer ${{ secrets.PERSONAL_ACCESS_TOKEN }}" \
88+
-H "X-GitHub-Api-Version: 2022-11-28" \
89+
"https://api.github.com/repos/nginxinc/nginx-hugo-theme/dispatches"
90+
-d "{\"event_type\": \"$event_type\", \"client_payload\": {\"previewURL\": \"${{PREVIEW_URL}}\"}}"
91+
env:
92+
PREVIEW_URL: ${{ needs.call-docs-build-push.outputs.PREVIEW_URL }}
93+
94+
7695
lighthouseci:
7796
if: github.event.pull_request
7897
needs: call-docs-build-push

0 commit comments

Comments
 (0)