update url

This commit is contained in:
aptalca 2022-02-17 09:52:55 -05:00
parent 703c5ff3fe
commit 3c3d4183fa
2 changed files with 6 additions and 6 deletions

View File

@ -21,7 +21,7 @@ jobs:
- name: Build image
run: |
# Set version
GO_WEBSITE=$(curl -sX GET https://golang.org/dl/)
GO_WEBSITE=$(curl -sLX GET https://go.dev/dl/)
GO_VERSION=${{ github.event.inputs.GO_VERSION }}
GO_VERSION=${GO_VERSION:-$(echo "$GO_WEBSITE" | grep -o '<span.*>.*linux-amd64.*</span>' | grep -oP '(?<=go).*(?=.linux)')}
if [ $(echo "$GO_VERSION" | tr -d -c '.' | awk '{ print length; }') = "1" ]; then GO_TAG="${GO_VERSION}.0"; else GO_TAG="${GO_VERSION}"; fi

View File

@ -1,4 +1,4 @@
FROM ghcr.io/linuxserver/baseimage-alpine:3.12 as buildstage
FROM ghcr.io/linuxserver/baseimage-alpine:3.15 as buildstage
ARG GO_VERSION
@ -7,18 +7,18 @@ RUN \
curl \
grep && \
if [ -z ${GO_VERSION+x} ]; then \
GO_VERSION=$(curl -sX GET https://golang.org/dl/ | grep -o '<span.*>.*linux-amd64.*</span>' | grep -oP '(?<=go).*(?=.linux)'); \
GO_VERSION=$(curl -sLX GET https://go.dev/dl/ | grep -o '<span.*>.*linux-amd64.*</span>' | grep -oP '(?<=go).*(?=.linux)'); \
fi && \
mkdir -p /root-layer/golang && \
curl -o \
/root-layer/golang/golang_x86_64.tar.gz -L \
https://dl.google.com/go/go${GO_VERSION}.linux-amd64.tar.gz && \
https://go.dev/dl/go${GO_VERSION}.linux-amd64.tar.gz && \
curl -o \
/root-layer/golang/golang_armv7l.tar.gz -L \
https://dl.google.com/go/go${GO_VERSION}.linux-armv6l.tar.gz && \
https://go.dev/dl/go${GO_VERSION}.linux-armv6l.tar.gz && \
curl -o \
/root-layer/golang/golang_aarch64.tar.gz -L \
https://dl.google.com/go/go${GO_VERSION}.linux-arm64.tar.gz
https://go.dev/dl/go${GO_VERSION}.linux-arm64.tar.gz
COPY root/ /root-layer/