-
Notifications
You must be signed in to change notification settings - Fork 11
42 lines (40 loc) · 1.56 KB
/
ping-build-machine.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
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."