Skip to content

Commit 7728459

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

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

.github/workflows/build-push.yml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,24 @@ 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+
curl -L \
84+
-X POST \
85+
-H "Accept: application/vnd.github+json" \
86+
-H "Authorization: Bearer ${{ secrets.PERSONAL_ACCESS_TOKEN }}" \
87+
-H "X-GitHub-Api-Version: 2022-11-28" \
88+
"https://api.github.com/repos/nginxinc/nginx-hugo-theme/dispatches" \
89+
-d "{"event_type": "trigger-slack-notification", "client_payload": {"previewURL": "${{PREVIEW_URL}}"}}"
90+
env:
91+
PREVIEW_URL: ${{ needs.call-docs-build-push.outputs.PREVIEW_URL }}
92+
93+
7694
lighthouseci:
7795
if: github.event.pull_request
7896
needs: call-docs-build-push

0 commit comments

Comments
 (0)