change endpoint to build latest stable only

This commit is contained in:
aptalca
2022-05-17 14:43:27 -04:00
parent 5d091aebf2
commit 86cb28249e
2 changed files with 4 additions and 4 deletions
+1 -1
View File
@@ -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 }} .