-
Notifications
You must be signed in to change notification settings - Fork 7
43 lines (41 loc) · 1.58 KB
/
docker-build-develop.yml
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
43
name: Publish development Package to dockerhub
on:
repository_dispatch:
workflow_dispatch:
push:
branches:
- 'develop'
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Login to DockerHub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build and push
uses: docker/build-push-action@v2
with:
file: Dockerfile.develop
push: true
tags: escolalms/api:${{github.ref_name}}
platforms: linux/amd64
- name: Create the Mattermost Message
run: |
echo "{\"text\":\"There is a new [escolalms/api:develop](https://hub.docker.com/r/escolalms/api/tags?page=1&name=develop) image built. k8s rollout will happen soon\"}" > mattermost.json
- uses: mattermost/action-mattermost-notify@master
with:
MATTERMOST_WEBHOOK_URL: ${{ secrets.MATTERMOST_WEBHOOK_URL }}
PAYLOAD: |-
{"text":"There is a new [escolalms/api:develop](https://hub.docker.com/r/escolalms/api/tags?page=1&name=develop) image built. k8s rollout will happen soon"}
- name: Send webook to hooks to rollout all devs on k8s
uses: distributhor/workflow-webhook@v3
env:
webhook_url: ${{ secrets.K8S_WEBHOOK_URL_API_DEVELOP }}