docker: split compile image and build image to remove cache (#374) #115
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build docker image and push to Docker Hub | |
on: | |
push: | |
branches: | |
- master | |
jobs: | |
build-n-push: | |
name: Build docker image and push to Docker Hub | |
if: github.repository == 'deepmodeling/dpdispatcher' | |
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: Build and push | |
run: | | |
docker buildx build --platform linux/arm64,linux/amd64 -t dptechnology/dpdispatcher:latest --push . |