File tree Expand file tree Collapse file tree 1 file changed +13
-3
lines changed
Expand file tree Collapse file tree 1 file changed +13
-3
lines changed Original file line number Diff line number Diff line change 33
44 workflow_dispatch :
55 inputs :
6+ branch :
7+ description : " Git branch to build"
8+ required : true
9+ default : release-v2
10+ type : string
611 image_version :
712 description : " Docker image version (e.g. 1.2.3)"
813 required : true
@@ -18,11 +23,15 @@ jobs:
1823
1924 env :
2025 DOCKER_IMAGE_VERSION : ${{ inputs.image_version }}
26+ BUILD_BRANCH : ${{ inputs.branch }}
27+ DOCKER_IMAGE_NAME : sparrowapi/sparrow-api
2128
2229 steps :
2330 - name : Checkout
2431 uses : actions/checkout@v4
25-
32+ with :
33+ ref : ${{ env.BUILD_BRANCH }}
34+ fetch-depth : 0
2635 - name : Set up QEMU
2736 uses : docker/setup-qemu-action@v3
2837
3746
3847 - name : Build and push (multi-arch)
3948 run : |
49+ set -euo pipefail
4050 docker buildx build \
4151 --platform linux/amd64,linux/arm64 \
4252 --build-arg GITHUB_TOKEN=${{ secrets.SPARROW_GITHUB_TOKEN }} \
43- -t sparrowapi/sparrow-api :${DOCKER_IMAGE_VERSION} \
44- -t sparrowapi/sparrow-api :latest \
53+ -t $DOCKER_IMAGE_NAME :${DOCKER_IMAGE_VERSION} \
54+ -t $DOCKER_IMAGE_NAME :latest \
4555 --push .
You can’t perform that action at this time.
0 commit comments