File tree 4 files changed +9
-17
lines changed
4 files changed +9
-17
lines changed Original file line number Diff line number Diff line change 4
4
push :
5
5
tags :
6
6
- ' v*'
7
- branches :
8
- - master
9
- - main
10
- - release
11
7
12
8
jobs :
13
9
docker :
21
17
22
18
- name : Get tag
23
19
id : get_tag
24
- run : echo ::set-output name=tag::${GITHUB_REF#refs/ tags/}
20
+ run : echo "TAG=$(git describe -- tags --always --match 'v*')" >> $GITHUB_OUTPUT
25
21
26
22
- name : Set up QEMU
27
23
uses : docker/setup-qemu-action@v2
42
38
context : .
43
39
push : true
44
40
platforms : linux/amd64,linux/arm64
45
- tags : tobyxdd/hysteria:latest,tobyxdd/hysteria:${{ steps.get_tag.outputs.tag }}
41
+ tags : tobyxdd/hysteria:latest,tobyxdd/hysteria:${{ steps.get_tag.outputs.TAG }}
46
42
47
43
- name : Image digest
48
44
run : echo ${{ steps.docker_build.outputs.digest }}
Original file line number Diff line number Diff line change 4
4
push :
5
5
tags :
6
6
- ' v*'
7
- branches :
8
- - master
9
- - main
10
- - release
11
7
12
8
jobs :
13
9
Original file line number Diff line number Diff line change 13
13
label : build-{{.TASK}}
14
14
vars :
15
15
BUILD_VERSION :
16
- sh : git describe --tags
16
+ sh : git describe --tags --always --match 'v*'
17
17
BUILD_COMMIT :
18
18
sh : git rev-parse HEAD
19
19
BUILD_DATE :
Original file line number Diff line number Diff line change @@ -9,20 +9,20 @@ function PlatformToEnv($os, $arch) {
9
9
$env: CGO_ENABLED = 0
10
10
$env: GOOS = $os
11
11
$env: GOARCH = $arch
12
-
12
+
13
13
switch - Regex ($arch ) {
14
- " arm" {
14
+ " arm" {
15
15
$env: GOARM = " 7"
16
16
}
17
- " armv5" {
17
+ " armv5" {
18
18
$env: GOARM = " 5"
19
19
$env: GOARCH = " arm"
20
20
}
21
- " armv6" {
21
+ " armv6" {
22
22
$env: GOARM = " 6"
23
23
$env: GOARCH = " arm"
24
24
}
25
- " armv7" {
25
+ " armv7" {
26
26
$env: GOARM = " 7"
27
27
$env: GOARCH = " arm"
28
28
}
@@ -67,7 +67,7 @@ if ($env:HY_APP_VERSION) {
67
67
$ldflags += " -X 'main.appVersion=$ ( $env: HY_APP_VERSION ) '"
68
68
}
69
69
else {
70
- $ldflags += " -X 'main.appVersion=$ ( git describe -- tags -- always) '"
70
+ $ldflags += " -X 'main.appVersion=$ ( git describe -- tags -- always - -match " v* " ) '"
71
71
}
72
72
if ($env: HY_APP_COMMIT ) {
73
73
$ldflags += " -X 'main.appCommit=$ ( $env: HY_APP_COMMIT ) '"
You can’t perform that action at this time.
0 commit comments