feat: update version to v2.2.1 in config.toml
rabbitprincess committed
May 8, 2026 at 22:41 UTC
1963b1fb3a0fd9ccda16a021a4910491de9dfbfd
2 files changed
+50
-9
.github/workflows/branch-artifacts.yml
+49
-8
@@ -2,17 +2,23 @@ name: Branch Artifacts
2
3
permissions:
4
contents: read
5
+ packages: write
6
7
on:
8
workflow_dispatch:
9
inputs:
10
ref:
10
- description: Branch, tag, or commit SHA to build
11
- required: true
12
- default: feature/encrypted-clienthello
11
+ description: Branch, tag, or commit SHA to build. Leave empty to build the workflow branch.
12
+ required: false
13
+
14
+env:
15
+ BUILD_REF: ${{ inputs.ref || github.ref_name }}
16
+ REGISTRY: ghcr.io
17
+ IMAGE_NAME: gosuda/portal
18
+ PLATFORMS: linux/amd64,linux/arm64
19
20
concurrency:
15
- group: branch-artifacts-${{ inputs.ref }}
21
+ group: branch-artifacts-${{ inputs.ref || github.ref_name }}
22
cancel-in-progress: true
23
24
jobs:
@@ -24,7 +30,7 @@ jobs:
30
- name: Checkout selected ref
31
uses: actions/checkout@v6
32
with:
27
- ref: ${{ inputs.ref }}
33
+ ref: ${{ env.BUILD_REF }}
34
35
- name: Set up Go
36
uses: actions/setup-go@v6
@@ -36,12 +42,47 @@ jobs:
42
id: meta
43
shell: bash
44
run: |
39
- safe_ref="$(printf '%s' "${{ inputs.ref }}" | tr '/:@' '---' | tr -cd 'A-Za-z0-9._-')"
45
+ safe_ref="$(printf '%s' "$BUILD_REF" | tr '[:upper:]' '[:lower:]' | tr '/:@' '---' | tr -cd 'a-z0-9._-')"
46
if [ -z "$safe_ref" ]; then
47
safe_ref="selected-ref"
48
fi
49
+ safe_ref="${safe_ref:0:80}"
50
+ short_sha="$(git rev-parse --short=12 HEAD)"
51
echo "safe_ref=$safe_ref" >> "$GITHUB_OUTPUT"
44
- echo "short_sha=$(git rev-parse --short=12 HEAD)" >> "$GITHUB_OUTPUT"
52
+ echo "short_sha=$short_sha" >> "$GITHUB_OUTPUT"
53
+ echo "commit_sha=$(git rev-parse HEAD)" >> "$GITHUB_OUTPUT"
54
+ {
55
+ echo "image_tags<<EOF"
56
+ echo "${REGISTRY}/${IMAGE_NAME}:branch-${safe_ref}"
57
+ echo "${REGISTRY}/${IMAGE_NAME}:branch-${safe_ref}-${short_sha}"
58
+ echo "EOF"
59
+ } >> "$GITHUB_OUTPUT"
60
+
61
+ - name: Log in to Container Registry
62
+ uses: docker/login-action@v3
63
+ with:
64
+ registry: ${{ env.REGISTRY }}
65
+ username: ${{ github.actor }}
66
+ password: ${{ secrets.GITHUB_TOKEN }}
67
+
68
+ - name: Set up QEMU
69
+ uses: docker/setup-qemu-action@v3
70
+
71
+ - name: Set up Docker Buildx
72
+ uses: docker/setup-buildx-action@v3
73
+
74
+ - name: Build and push Docker image
75
+ uses: docker/build-push-action@v6
76
+ with:
77
+ platforms: ${{ env.PLATFORMS }}
78
+ push: true
79
+ tags: ${{ steps.meta.outputs.image_tags }}
80
+ labels: |
81
+ org.opencontainers.image.source=https://github.com/${{ github.repository }}
82
+ org.opencontainers.image.revision=${{ steps.meta.outputs.commit_sha }}
83
+ org.opencontainers.image.ref.name=${{ env.BUILD_REF }}
84
+ cache-from: type=gha,mode=max
85
+ cache-to: type=gha,mode=max
86
87
- name: Build binaries
88
shell: bash
@@ -74,4 +115,4 @@ jobs:
115
with:
116
name: portal-${{ steps.meta.outputs.safe_ref }}-${{ steps.meta.outputs.short_sha }}
117
path: release/*
77
- if-no-files-found: error
\ No newline at end of file
118
+ if-no-files-found: error
config.toml
+1
-1
@@ -2,7 +2,7 @@
2
# Bump protocol versions only when wire-level behavior changes.
3
4
[release]
5
-version = "v2.2.0"
5
+version = "v2.2.1"
6
base_url = "https://github.com/gosuda/portal-tunnel/releases"
7
8
[protocol]