@@ -19,16 +19,42 @@ jobs:
1919 make test
2020 make
2121 make build.docker
22+ - run : |
23+ make test
24+ make build.linux.amd64
25+ make build.linux.arm64
2226 - run : goveralls -coverprofile=profile.cov -service=github
2327 env :
2428 COVERALLS_TOKEN : ${{ secrets.GITHUB_TOKEN }}
25- - name : Push the latest Docker image
26- run : |
27- echo ${{ secrets.DOCKERHUB_PASSWORD }} | docker login -u ${{ secrets.DOCKERHUB_USERNAME }} --password-stdin
28- VERSION=latest make build.push
29+ - name : Set up QEMU for multi-arch
30+ uses : docker/setup-qemu-action@v2
31+
32+ - name : Set up Docker Buildx
33+ uses : docker/setup-buildx-action@v2
34+
35+ - name : Log in to DockerHub
36+ uses : docker/login-action@v2
37+ with :
38+ username : ${{ secrets.DOCKERHUB_USERNAME }}
39+ password : ${{ secrets.DOCKERHUB_PASSWORD }}
40+
41+ - name : Build & push multi-arch image (latest)
2942 if : github.ref == 'refs/heads/master'
30- - name : Push the release Docker image
31- run : |
32- echo ${{ secrets.DOCKERHUB_PASSWORD }} | docker login -u ${{ secrets.DOCKERHUB_USERNAME }} --password-stdin
33- VERSION=${{ github.ref_name }} make build.push
43+ uses : docker/build-push-action@v3
44+ with :
45+ context : .
46+ file : Dockerfile
47+ platforms : linux/amd64,linux/arm64
48+ push : true
49+ tags : mikkeloscar/pdb-controller:latest
50+
51+ - name : Build & push multi-arch image (release)
3452 if : startsWith(github.ref, 'refs/tags/')
53+ uses : docker/build-push-action@v3
54+ with :
55+ context : .
56+ file : Dockerfile
57+ platforms : linux/amd64,linux/arm64
58+ push : true
59+ tags : |
60+ mikkeloscar/pdb-controller:${{ github.ref_name }}
0 commit comments