Skip to content

Commit 1211abb

Browse files
build: added selfhost workflow
1 parent 1e6cae3 commit 1211abb

File tree

1 file changed

+9
-6
lines changed

1 file changed

+9
-6
lines changed

.github/workflows/sparrowproxy-selfhost.yml

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,21 @@
11
name: Self-host Docker Image
22
on:
3-
push:
4-
branches: [ main ]
53
workflow_dispatch:
4+
inputs:
5+
image_version:
6+
description: "Docker image version (e.g. 1.2.3)"
7+
required: true
8+
type: string
69

710
permissions:
811
contents: read
912

10-
env:
11-
DOCKER_IMAGE_VERSION: ${{ vars.SELF_HOST_DOCKER_IMAGE_VERSION }}
12-
1313
jobs:
1414
build:
1515
runs-on: ubuntu-latest
1616
environment: self-host
17+
env:
18+
DOCKER_IMAGE_VERSION: ${{ inputs.image_version }}
1719

1820
steps:
1921
- name: Checkout
@@ -33,9 +35,10 @@ jobs:
3335

3436
- name: Build and push (multi-arch)
3537
run: |
38+
echo "Building version: ${DOCKER_IMAGE_VERSION}"
3639
docker buildx build \
3740
--platform linux/amd64,linux/arm64 \
3841
--build-arg GITHUB_TOKEN=${{ secrets.SPARROW_GITHUB_TOKEN }} \
3942
-t ssparrowapi/sparrow-proxy:self-host-${DOCKER_IMAGE_VERSION} \
4043
-t ssparrowapi/sparrow-proxy:latest \
41-
--push .
44+
--push .

0 commit comments

Comments
 (0)