Skip to content

Commit 4b014e3

Browse files
Support the runner context of gitea act (#147)
* Support the runner context of gitea act Signed-off-by: josedev-union <70741025+josedev-union@users.noreply.github.com> * Correct error messages Signed-off-by: josedev-union <70741025+josedev-union@users.noreply.github.com> --------- Signed-off-by: josedev-union <70741025+josedev-union@users.noreply.github.com>
1 parent 38ab09d commit 4b014e3

1 file changed

Lines changed: 16 additions & 16 deletions

File tree

action.yml

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -49,13 +49,13 @@ runs:
4949
5050
shaprog() {
5151
case ${{ runner.os }} in
52-
Linux)
52+
Linux|linux)
5353
sha256sum $1 | cut -d' ' -f1
5454
;;
55-
macOS)
55+
macOS|macos)
5656
shasum -a256 $1 | cut -d' ' -f1
5757
;;
58-
Windows)
58+
Windows|windows)
5959
powershell -command "(Get-FileHash $1 -Algorithm SHA256 | Select-Object -ExpandProperty Hash).ToLower()"
6060
;;
6161
*)
@@ -79,9 +79,9 @@ runs:
7979
pushd ${{ inputs.install-dir }} > /dev/null
8080
8181
case ${{ runner.os }} in
82-
Linux)
82+
Linux|linux)
8383
case ${{ runner.arch }} in
84-
X64)
84+
X64|amd64)
8585
bootstrap_filename='cosign-linux-amd64'
8686
bootstrap_sha=${bootstrap_linux_amd64_sha}
8787
desired_cosign_filename='cosign-linux-amd64'
@@ -92,7 +92,7 @@ runs:
9292
fi
9393
;;
9494
95-
ARM)
95+
ARM|arm)
9696
bootstrap_filename='cosign-linux-arm'
9797
bootstrap_sha=${bootstrap_linux_arm_sha}
9898
desired_cosign_filename='cosign-linux-arm'
@@ -102,7 +102,7 @@ runs:
102102
fi
103103
;;
104104
105-
ARM64)
105+
ARM64|arm64)
106106
bootstrap_filename='cosign-linux-arm64'
107107
bootstrap_sha=${bootstrap_linux_arm64_sha}
108108
desired_cosign_filename='cosign-linux-arm64'
@@ -113,15 +113,15 @@ runs:
113113
;;
114114
115115
*)
116-
log_error "unsupported architecture $arch"
116+
log_error "unsupported architecture ${{ runner.arch }}"
117117
exit 1
118118
;;
119119
esac
120120
;;
121121
122-
macOS)
122+
macOS|macos)
123123
case ${{ runner.arch }} in
124-
X64)
124+
X64|amd64)
125125
bootstrap_filename='cosign-darwin-amd64'
126126
bootstrap_sha=${bootstrap_darwin_amd64_sha}
127127
desired_cosign_filename='cosign-darwin-amd64'
@@ -132,7 +132,7 @@ runs:
132132
fi
133133
;;
134134
135-
ARM64)
135+
ARM64|arm64)
136136
bootstrap_filename='cosign-darwin-arm64'
137137
bootstrap_sha=${bootstrap_darwin_arm64_sha}
138138
desired_cosign_filename='cosign-darwin-arm64'
@@ -144,15 +144,15 @@ runs:
144144
;;
145145
146146
*)
147-
log_error "unsupported architecture $arch"
147+
log_error "unsupported architecture ${{ runner.arch }}"
148148
exit 1
149149
;;
150150
esac
151151
;;
152152
153-
Windows)
153+
Windows|windows)
154154
case ${{ runner.arch }} in
155-
X64)
155+
X64|amd64)
156156
bootstrap_filename='cosign-windows-amd64.exe'
157157
bootstrap_sha=${bootstrap_windows_amd64_sha}
158158
desired_cosign_filename='cosign-windows-amd64.exe'
@@ -164,13 +164,13 @@ runs:
164164
fi
165165
;;
166166
*)
167-
log_error "unsupported architecture $arch"
167+
log_error "unsupported architecture ${{ runner.arch }}"
168168
exit 1
169169
;;
170170
esac
171171
;;
172172
*)
173-
log_error "unsupported architecture $arch"
173+
log_error "unsupported os ${{ runner.os }}"
174174
exit 1
175175
;;
176176
esac

0 commit comments

Comments
 (0)