Skip to content

Commit 13210f0

Browse files
authored
Merge pull request #24 from sparrowapp-dev/build/selfhost-build
Build/selfhost build
2 parents ebe0e22 + 1211abb commit 13210f0

File tree

1 file changed

+44
-0
lines changed

1 file changed

+44
-0
lines changed
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
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 .

0 commit comments

Comments
 (0)