@@ -3,52 +3,57 @@ name: build
33on :
44 workflow_call :
55 inputs :
6- push :
6+ deploy :
77 type : boolean
88 default : false
99
1010 workflow_dispatch :
1111 inputs :
12- push :
12+ deploy :
1313 type : boolean
1414 default : false
1515
1616jobs :
1717 build :
1818 runs-on : ubuntu-latest
1919
20+ defaults :
21+ run :
22+ shell : bash
23+
2024 steps :
2125 - name : Checkout
22- uses : actions/checkout@v4.2 .2
26+ uses : actions/checkout@v6.0 .2
2327
2428 - name : Set up QEMU
25- uses : docker/setup-qemu-action@v3.6 .0
29+ uses : docker/setup-qemu-action@v4.0 .0
2630
2731 - name : Set up Docker Buildx
28- uses : docker/setup-buildx-action@v3.11.1
32+ uses : docker/setup-buildx-action@v4.0.0
2933
3034 - name : Log in to Docker Hub
31- if : ${{ inputs.push }}
32- uses : docker/login-action@v3.4.0
35+ uses : docker/login-action@v4.0.0
3336 with :
3437 username : ${{ secrets.DOCKERHUB_USER }}
3538 password : ${{ secrets.DOCKERHUB_TOKEN }}
3639
3740 - name : Extract Docker metadata
3841 id : meta
39- uses : docker/metadata-action@v5.7 .0
42+ uses : docker/metadata-action@v6.0 .0
4043 with :
4144 images : ${{ secrets.DOCKERHUB_USER }}/join-ci
4245 tags : |
4346 type=ref,event=branch
4447 type=sha
4548 type=raw,value=latest,enable={{is_default_branch}}
4649
47- - name : Build and push Docker image
48- uses : docker/build-push-action@v6.18 .0
50+ - name : Build and Deploy Docker image
51+ uses : docker/build-push-action@v7.0 .0
4952 with :
5053 context : .
51- push : ${{ inputs.push }}
54+ push : ${{ inputs.deploy }}
5255 platforms : linux/amd64,linux/arm64
5356 tags : ${{ steps.meta.outputs.tags }}
5457 labels : ${{ steps.meta.outputs.labels }}
58+ cache-from : type=registry,ref=${{ secrets.DOCKERHUB_USER }}/join-ci:buildcache
59+ cache-to : type=registry,ref=${{ secrets.DOCKERHUB_USER }}/join-ci:buildcache,mode=max
0 commit comments