Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
39 changes: 30 additions & 9 deletions .github/workflows/build-push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -79,16 +79,37 @@ jobs:
runs-on: ubuntu-latest
permissions: read-all
steps:
- name: Trigger 'Slack notification for new theme release' workflow in 'nginx-hugo-theme' repo.
run: |
curl -L \
-X POST \
-H "Accept: application/vnd.github+json" \
-H "Authorization: Bearer ${{ secrets.THEME_SLACK_FLOW_PAT }}" \
-H "X-GitHub-Api-Version: 2022-11-28" \
"https://api.github.com/repos/${{ secrets.OWNER }}/${{ secrets.REPO }}/dispatches" \
-d "{\"event_type\": \"trigger-slack-notification\", \"client_payload\": {\"previewURL\": \"${{ env.PREVIEW_URL }}\", \"author\": \"${{ github.event.client_payload.author}}\", \"tag_name\": \"${{ github.event.client_payload.tag_name }}\", \"release_name\": \"${{ github.event.client_payload.release_name }}\"}}"
- name: Send notification
uses: 8398a7/action-slack@1750b5085f3ec60384090fb7c52965ef822e869e # v3.18.0
with:
status: custom
custom_payload: |
{
username: 'Github',
mention: 'channel',
attachments: [{
title: `New theme release - ${{ github.event.client_payload.release_name }}`,
color: '#009223',
fields: [
{
title: 'Tag',
value: ${{ github.event.client_payload.tag_name }},
short: true
},
{
title: 'Author',
value: ${{ github.event.client_payload.author }},
short: true
},
{
title: 'Preview URL',
value: ${{ env.PREVIEW_URL }},
short: true
}]
}]
}
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL_FRIENDS_OF_DOCS }}
PREVIEW_URL: ${{ needs.call-docs-build-push.outputs.PREVIEW_URL }}


Expand Down
Loading