@@ -2,7 +2,28 @@ name: Build Release
22
33on :
44 workflow_dispatch :
5+ inputs :
6+ docker_tag :
7+ description : ' Docker image tag (leave empty to skip Docker push)'
8+ required : false
9+ default : ' '
10+ type : string
511 workflow_call :
12+ inputs :
13+ docker_tag :
14+ description : ' Docker image tag (leave empty to skip Docker push)'
15+ required : false
16+ default : ' '
17+ type : string
18+ secrets :
19+ DOCKERHUB_USERNAME :
20+ required : false
21+ DOCKERHUB_TOKEN :
22+ required : false
23+ outputs :
24+ image :
25+ description : ' Full Docker image reference'
26+ value : ${{ jobs.docker.outputs.image }}
627
728jobs :
829 build :
6990 oz-agent-worker-${{ matrix.goos }}-${{ matrix.goarch }}.tar.gz
7091 oz-agent-worker-${{ matrix.goos }}-${{ matrix.goarch }}.tar.xz
7192 oz-agent-worker-${{ matrix.goos }}-${{ matrix.goarch }}.zip
93+
94+ docker :
95+ name : Build and push Docker image
96+ runs-on : namespace-profile-ubuntu-small
97+ outputs :
98+ image : " warpdotdev/oz-agent-worker@${{ steps.push.outputs.digest }}"
99+ steps :
100+ - name : Check out repository
101+ uses : actions/checkout@v6
102+
103+ - name : Log in to DockerHub
104+ uses : docker/login-action@v4
105+ with :
106+ username : ${{ secrets.DOCKERHUB_USERNAME }}
107+ password : ${{ secrets.DOCKERHUB_TOKEN }}
108+
109+ - name : Build and push image
110+ id : push
111+ uses : docker/build-push-action@v5
112+ with :
113+ context : .
114+ file : ./Dockerfile
115+ provenance : mode=max
116+ sbom : true
117+ # Only push tagged images. When not pushing, we need to provide a fallback output
118+ # as multi-platform images can't be loaded into the local Docker store by default.
119+ # See https://docs.docker.com/reference/cli/docker/buildx/build/#docker
120+ outputs : ${{ inputs.docker_tag != '' && 'type=registry' || 'type=local,dest=built-images' }}
121+ platforms : linux/amd64,linux/arm64
122+ tags : warpdotdev/oz-agent-worker:${{ inputs.docker_tag || github.sha }}
123+ labels :
124+ dev.warp.worker-commit=${{ github.sha }}
0 commit comments