File tree Expand file tree Collapse file tree 1 file changed +44
-0
lines changed Expand file tree Collapse file tree 1 file changed +44
-0
lines changed Original file line number Diff line number Diff line change 1+ name : Self-host Docker Image
2+ on :
3+ workflow_dispatch :
4+ inputs :
5+ image_version :
6+ description : " Docker image version (e.g. 1.2.3)"
7+ required : true
8+ type : string
9+
10+ permissions :
11+ contents : read
12+
13+ jobs :
14+ build :
15+ runs-on : ubuntu-latest
16+ environment : self-host
17+ env :
18+ DOCKER_IMAGE_VERSION : ${{ inputs.image_version }}
19+
20+ steps :
21+ - name : Checkout
22+ uses : actions/checkout@v4
23+
24+ - name : Set up QEMU
25+ uses : docker/setup-qemu-action@v3
26+
27+ - name : Set up Buildx
28+ uses : docker/setup-buildx-action@v3
29+
30+ - name : Log in to Docker Hub
31+ uses : docker/login-action@v3
32+ with :
33+ username : ${{ secrets.DOCKERHUB_USERNAME }}
34+ password : ${{ secrets.DOCKERHUB_PASSWORD }}
35+
36+ - name : Build and push (multi-arch)
37+ run : |
38+ echo "Building version: ${DOCKER_IMAGE_VERSION}"
39+ docker buildx build \
40+ --platform linux/amd64,linux/arm64 \
41+ --build-arg GITHUB_TOKEN=${{ secrets.SPARROW_GITHUB_TOKEN }} \
42+ -t ssparrowapi/sparrow-proxy:self-host-${DOCKER_IMAGE_VERSION} \
43+ -t ssparrowapi/sparrow-proxy:latest \
44+ --push .
You can’t perform that action at this time.
0 commit comments