Merge pull request #376 from linuxserver/code-server-powershell-version

change endpoint to build latest stable only
This commit is contained in:
aptalca
2022-05-17 14:58:16 -04:00
committed by GitHub
2 changed files with 4 additions and 4 deletions
+1 -1
View File
@@ -16,7 +16,7 @@ jobs:
- name: Build image - name: Build image
run: | run: |
# Set version # 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 echo "PS_VERSION=${PS_VERSION}" >> $GITHUB_ENV
# Build image # Build image
docker build --no-cache --build-arg PS_VERSION=${PS_VERSION} -t ${{ github.sha }} . docker build --no-cache --build-arg PS_VERSION=${PS_VERSION} -t ${{ github.sha }} .
+3 -3
View File
@@ -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 ARG PS_VERSION
@@ -7,8 +7,8 @@ RUN \
curl \ curl \
jq && \ jq && \
if [ -z ${PS_VERSION+x} ]; then \ if [ -z ${PS_VERSION+x} ]; then \
PS_VERSION=$(curl -sX GET "https://api.github.com/repos/PowerShell/PowerShell/releases/latest" \ PS_VERSION=$(curl -Ls -o /dev/null -w %{url_effective} https://aka.ms/powershell-release?tag=stable \
| jq -r .tag_name | awk '{print substr($1,2); }'); \ | sed 's|.*tag/v||g'); \
fi && \ fi && \
mkdir -p /root-layer/powershell && \ mkdir -p /root-layer/powershell && \
curl -o \ curl -o \