Skip to content

Merge pull request #656 from deepmodeling/release-please--branches--m… #304

Merge pull request #656 from deepmodeling/release-please--branches--m…

Merge pull request #656 from deepmodeling/release-please--branches--m… #304

Workflow file for this run

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