Skip to content

Commit 7038ede

Browse files
committed
add workflow input for trigger
1 parent 9b02568 commit 7038ede

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

.github/workflows/BuildImage.yml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,11 @@
11
name: Build Image
22

3-
on: [push, pull_request, workflow_dispatch]
3+
on:
4+
push:
5+
pull_request:
6+
workflow_dispatch:
7+
inputs:
8+
GO_VERSION:
49

510
env:
611
ENDPOINT: "linuxserver/mods" #don't modify
@@ -17,6 +22,7 @@ jobs:
1722
run: |
1823
# Set version
1924
GO_WEBSITE=$(curl -sX GET https://golang.org/dl/)
25+
GO_VERSION=${{ github.event.inputs.GO_VERSION }}
2026
GO_VERSION=${GO_VERSION:-$(echo "$GO_WEBSITE" | grep -o '<span.*>.*linux-amd64.*</span>' | grep -oP '(?<=go).*(?=.linux)')}
2127
if [ $(echo "$GO_VERSION" | tr -d -c '.' | awk '{ print length; }') = "1" ]; then GO_TAG="${GO_VERSION}.0"; else GO_TAG="${GO_VERSION}"; fi
2228
echo "GO_TAG=${GO_TAG}" >> $GITHUB_ENV

0 commit comments

Comments
 (0)