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