mirror of
https://github.com/linuxserver/docker-mods.git
synced 2026-03-23 00:05:28 +08:00
change endpoint to build latest stable only
This commit is contained in:
parent
5d091aebf2
commit
86cb28249e
2
.github/workflows/BuildImage.yml
vendored
2
.github/workflows/BuildImage.yml
vendored
@ -16,7 +16,7 @@ jobs:
|
||||
- name: Build image
|
||||
run: |
|
||||
# Set version
|
||||
PS_VERSION=$(curl -sX GET "https://api.github.com/repos/PowerShell/PowerShell/releases/latest" | jq -r .tag_name | awk '{print substr($1,2); }')
|
||||
PS_VERSION=$(curl -Ls -o /dev/null -w %{url_effective} https://aka.ms/powershell-release?tag=stable | sed 's|.*tag/v||g')
|
||||
echo "PS_VERSION=${PS_VERSION}" >> $GITHUB_ENV
|
||||
# Build image
|
||||
docker build --no-cache --build-arg PS_VERSION=${PS_VERSION} -t ${{ github.sha }} .
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
FROM ghcr.io/linuxserver/baseimage-alpine:3.13 as buildstage
|
||||
FROM ghcr.io/linuxserver/baseimage-alpine:3.14 as buildstage
|
||||
|
||||
ARG PS_VERSION
|
||||
|
||||
@ -7,8 +7,8 @@ RUN \
|
||||
curl \
|
||||
jq && \
|
||||
if [ -z ${PS_VERSION+x} ]; then \
|
||||
PS_VERSION=$(curl -sX GET "https://api.github.com/repos/PowerShell/PowerShell/releases/latest" \
|
||||
| jq -r .tag_name | awk '{print substr($1,2); }'); \
|
||||
PS_VERSION=$(curl -Ls -o /dev/null -w %{url_effective} https://aka.ms/powershell-release?tag=stable \
|
||||
| sed 's|.*tag/v||g'); \
|
||||
fi && \
|
||||
mkdir -p /root-layer/powershell && \
|
||||
curl -o \
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user