-
Notifications
You must be signed in to change notification settings - Fork 4
45 lines (43 loc) · 1.8 KB
/
docker_build.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
44
45
name: Publish Package to dockerhub
on:
release:
types: [created]
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
with:
platforms: "arm64,arm"
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to DockerHub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build and push
uses: docker/build-push-action@v5
with:
push: true
# Cannot be built at the moment https://github.com/nodejs/docker-node/issues/1335
# platforms: linux/amd64,linux/arm64
tags: escolalms/demo:${{github.ref_name}}, escolalms/demo:latest
build-args: APP_VERSION=${{github.ref_name}}
# - name: Create the Mattermost Message
# run: |
# echo "{\"text\":\"There is a new [escolalms/demo:latest](https://hub.docker.com/r/escolalms/demo/tags?page=1&name=latest) and version `${{github.ref_name}}` 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/demo:latest](https://hub.docker.com/r/escolalms/demo/tags?page=1&name=latest) and version `${{github.ref_name}}` 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_DEMO_LATEST }}