1818 image : ${{ steps.set.outputs.image }}
1919 steps :
2020 -
21- uses : actions/github-script@v4
21+ uses : actions/github-script@v7
2222 id : set
2323 with :
2424 script : |
3131 needs : [pre]
3232
3333 steps :
34- - uses : actions/checkout@v2
35- - uses : hadolint/hadolint-action@v1.6.0
34+ - name : Checkout
35+ uses : actions/checkout@v4
36+
37+ - uses : hadolint/hadolint-action@v3.1.0
3638 with :
3739 dockerfile : Dockerfile
3840 -
@@ -45,46 +47,35 @@ jobs:
4547 -
4648 name : Docker meta
4749 id : meta
48- uses : docker/metadata-action@v3
50+ uses : docker/metadata-action@v5
4951 with :
5052 images : ${{ needs.pre.outputs.image }}
5153 flavor : |
5254 latest=${{ steps.latest.outputs.newer == 'true' || steps.latest.outputs.equal == 'true' }}
5355 tags : |
5456 type=ref,event=tag
5557 type=ref,event=branch
56- -
57- name : Set up Docker Buildx
58- uses : docker/setup-buildx-action@v1
59- -
60- name : Cache Docker layers
61- uses : actions/cache@v2
58+
59+ - name : Set up QEMU
60+ uses : docker/setup-qemu-action@v3
6261 with :
63- path : /tmp/.buildx-cache
64- key : ${{ runner.os }}-buildx-${{ matrix.flavor }}-${{ github.sha }}
65- restore-keys : |
66- ${{ runner.os }}-buildx-${{ matrix.flavor }}
62+ # amd64 is native platform at the moment and should not be specified here to keep amd64 builds fast
63+ platforms : linux/arm64
64+
65+ - name : Set up Docker Buildx
66+ uses : docker/setup-buildx-action@v3
6767 -
68- uses : docker/login-action@v1
68+ uses : docker/login-action@v3
6969 with :
7070 username : ${{ secrets.DOCKERHUB_USER }}
7171 password : ${{ secrets.DOCKERHUB_TOKEN }}
72- -
73- name : Build and push
74- uses : docker/build-push-action@v2
72+
73+ - name : Build and push
74+ uses : docker/build-push-action@v6
7575 with :
76+ platforms : linux/amd64,linux/arm64
7677 context : .
7778 push : ${{ steps.latest.outputs.newer == 'true' || steps.latest.outputs.equal == 'true' }}
7879 file : Dockerfile
7980 tags : ${{ steps.meta.outputs.tags }}
8081 labels : ${{ steps.meta.outputs.labels }}
81- cache-from : type=local,src=/tmp/.buildx-cache
82- cache-to : type=local,dest=/tmp/.buildx-cache-new
83- -
84- # Temp fix
85- # https://github.com/docker/build-push-action/issues/252
86- # https://github.com/moby/buildkit/issues/1896
87- name : Move cache
88- run : |
89- rm -rf /tmp/.buildx-cache
90- mv /tmp/.buildx-cache-new /tmp/.buildx-cache
0 commit comments