1- name : Publish Docker image
1+ name : Publish Docker image to DockerHub
22on :
33 push :
4- branches : [ master ]
4+ branches : [ dev ]
55 pull_request :
6+ branches : [ dev ]
67
8+ # https://docs.docker.com/build/ci/github-actions/multi-platform/
79jobs :
810 docker :
911 name : Build Docker Image and Publish (only on push)
1012 runs-on : ubuntu-latest
1113 steps :
12-
14+
1315 - name : Check out the repo
14- uses : actions/checkout@v2
15-
16- # Steps required by docker/build-push-action@v2
16+ uses : actions/checkout@v4
1717 - name : Set up QEMU
18- uses : docker/setup-qemu-action@v1
18+ uses : docker/setup-qemu-action@v3
1919 - name : Set up Docker Buildx
20- uses : docker/setup-buildx-action@v1
21- - name : Login to DockerHub
22- uses : docker/login-action@v1
23- if : github.event_name == 'push'
20+ uses : docker/setup-buildx-action@v3
21+ - name : Login to Docker Hub
22+ uses : docker/login-action@v3
2423 with :
2524 username : ${{ secrets.DOCKERHUB_USERNAME }}
2625 password : ${{ secrets.DOCKERHUB_ACCESS_TOKEN }}
27-
28- - name : Build (always) and Publish (only on push)
29- uses : docker/build-push-action@v2
26+ - name : Build and push
27+ uses : docker/build-push-action@v5
3028 with :
31- tags : ucbbar/chisel-bootcamp:latest
32- push : ${{ github.event_name == 'push' }}
29+ context : .
30+ platforms : linux/amd64,linux/arm64
31+ push : true
32+ tags : sysprog21/chisel-bootcamp:latest
0 commit comments