66 service_config :
77 description : ' Service configuration'
88 required : true
9- default : ' jito-tip-router -keeper'
9+ default : ' ncn -keeper'
1010 type : choice
1111 options :
12- - jito-tip-router- ncn-keeper
12+ - ncn-keeper
1313
1414env :
1515 REGISTRY : ghcr.io
16- IMAGE_NAME : ${{ github.repository }}
1716
1817jobs :
1918 build-container :
@@ -33,23 +32,35 @@ jobs:
3332 username : ${{ github.actor }}
3433 password : ${{ secrets.GITHUB_TOKEN }}
3534
35+ - name : Determine Docker target and image name
36+ id : config
37+ run : |
38+ case "${{ github.event.inputs.service_config }}" in
39+ "ncn-keeper")
40+ echo "target=jito-tip-router-ncn-keeper" >> $GITHUB_OUTPUT
41+ echo "service=jito-tip-router-ncn-keeper" >> $GITHUB_OUTPUT
42+ echo "image_name=${{ github.repository }}/jito-tip-router-ncn-keeper" >> $GITHUB_OUTPUT
43+ ;;
44+ esac
45+
3646 - name : Extract metadata
3747 id : meta
3848 uses : docker/metadata-action@v5
3949 with :
40- images : ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
50+ images : ${{ env.REGISTRY }}/${{ steps.config.outputs.image_name }}
4151 tags : |
42- type=raw,value=${{ github.ref_name }}-${{ github.event.inputs.service_config }}- {{sha}}
43- type=raw,value=${{ github.ref_name }}-${{ github.event.inputs.service_config }}- latest
52+ type=raw,value={{sha}}
53+ type=raw,value=latest
4454
4555 - name : Build and push container
4656 uses : docker/build-push-action@v5
4757 with :
4858 context : .
4959 file : ./cli/Dockerfile
60+ target : ${{ steps.config.outputs.target }}
5061 platforms : linux/amd64
5162 push : true
5263 tags : ${{ steps.meta.outputs.tags }}
5364 labels : ${{ steps.meta.outputs.labels }}
5465 cache-from : type=gha
55- cache-to : type=gha,mode=max
66+ cache-to : type=gha,mode=max
0 commit comments