forked from dptech-corp/dflow
-
Notifications
You must be signed in to change notification settings - Fork 26
54 lines (46 loc) · 1.55 KB
/
ci-docker.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
46
47
48
49
50
51
52
53
54
name: Build docker image and push to Docker Hub
on:
push:
branches:
- master
paths:
- 'VERSION'
jobs:
build-n-push:
if: github.repository_owner == 'deepmodeling'
name: Build docker image and push to Docker Hub
runs-on: ubuntu-latest
steps:
- name: Check out the repo
uses: actions/checkout@v3
- name: Log in to Docker Hub
uses: docker/login-action@f054a8b539a109f9f41c372932f1ae047eff08c9
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
- name: Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v2
- name: read version
id: read
uses: juliangruber/read-file-action@v1
with:
path: ./VERSION
- name: Build and push
run: |
docker buildx build . --push --platform linux/arm64,linux/amd64 -t dptechnology/dflow:v${{ steps.read.outputs.content }}
docker buildx build . --push --platform linux/arm64,linux/amd64 -t dptechnology/dflow:latest
- name: send email
uses: dawidd6/action-send-mail@v3
with:
server_address: smtp.feishu.cn
server_port: 465
username: ${{ secrets.MAILUSERNAME }}
password: ${{ secrets.MAILPASSWORD }}
subject: Docker Auto Build For Dflow
body: Docker image has been pushed to dptechnology/dflow:v${{ steps.read.outputs.content }}
to: ${{ secrets.MAIL_RECEIVER_LIST }}
from: Github Actions
content_type: text