Skip to content

Fix notify job

Fix notify job #54

name: Trigger Build Machine Docker Build
on:
push:
branches:
- dev
paths-ignore:
- "**/*.md"
jobs:
ping:
if: github.actor != 'dependabot[bot]' && github.actor != 'github-actions[bot]'
runs-on: ubuntu-latest
steps:
# Dispatch for 'dev' branch
- name: Send Repository Dispatch
if: github.ref == 'refs/heads/dev'
uses: peter-evans/repository-dispatch@v3
with:
token: ${{ secrets.ORG_ACCESS_TOKEN }}
repository: genez-io/genezio-build-machine
event-type: redeploy-build-machine-docker-images-dev
- name: Send Repository Dispatch - Runtime workflows
if: github.ref == 'refs/heads/dev'
uses: peter-evans/repository-dispatch@v3
with:
token: ${{ secrets.ORG_ACCESS_TOKEN }}
repository: genez-io/genezio-build-machine
event-type: redeploy-build-machine-workflows-runtime-dev
notify:
if: always()
runs-on: ubuntu-latest
needs: ping
steps:
- name: Notify slack
uses: slackapi/[email protected]
with:
method: chat.postMessage
token: ${{ secrets.SLACK_NOTIFICATIONS_BOT_TOKEN }}
payload: |
channel: ${{ secrets.SLACK_CHANNEL_ID }}
text: "A redeployment for the build machine has been triggered from the ${{github.ref}} branch."