Skip to content

Commit

Permalink
Update push-docs.yaml
Browse files Browse the repository at this point in the history
  • Loading branch information
Rachael-Graham committed Nov 4, 2024
1 parent f12d76e commit aa64e4c
Showing 1 changed file with 34 additions and 1 deletion.
35 changes: 34 additions & 1 deletion .github/workflows/push-docs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -158,4 +158,37 @@ jobs:
--base main \
--head ${{ steps.create-branch.outputs.branch }} \
--reviewer solo-io/solo-docs
popd || exit 1
popd || exit 1
slack-notification:
runs-on: ubuntu-latest
needs:
- copy-docs
steps:
- name: Notify on workflow success
if: |
needs.copy-docs.result == 'success'
env:
SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }}
run: |
MESSAGE="✅ *Success:* Automated copy of reference docs for ${{ steps.version-variables.outputs.minor }} was successful. <https://github.com/solo-io/docs/pulls|Review the PR>"
curl \
-d "text=$MESSAGE" \
-d "channel=doctopus-tests" \
-d "token=${SLACK_BOT_TOKEN}" \
-X POST https://slack.com/api/chat.postMessage
- name: Notify on workflow failure
if: |
needs.copy-docs.result == 'failure'
env:
SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }}
run: |
JOB_URL=https://github.com/solo-io/gloo/actions/runs/${GITHUB_RUN_ID}
MESSAGE="❌ *Failure:* Automated copy of reference docs for ${{ steps.version-variables.outputs.minor }} failed. <${JOB_URL}|Review the workflow failure>"
curl \
-d "text=$MESSAGE" \
-d "channel=doctopus-tests" \
-d "token=${SLACK_BOT_TOKEN}" \
-X POST https://slack.com/api/chat.postMessage

0 comments on commit aa64e4c

Please sign in to comment.