Skip to content

Commit

Permalink
test(e2e): new way of downloading latest release
Browse files Browse the repository at this point in the history
Signed-off-by: Daniel Villanueva <[email protected]>
  • Loading branch information
danivilla9 committed Jan 14, 2025
1 parent 888d228 commit d18de7f
Showing 1 changed file with 7 additions and 17 deletions.
24 changes: 7 additions & 17 deletions .github/workflows/pr-check.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -176,25 +176,15 @@ jobs:
if: matrix.os == 'macos-14'
run: |
ARCH=$(uname -m)
response=$(curl -s --show-error https://api.github.com/repos/containers/podman/releases/latest)
if [ $? -ne 0 ]; then
echo "Failed to fetch the latest release information"
exit 1
fi
LATEST_RELEASE=$(echo "$response" | grep -o '"tag_name": "v[^"]*' | sed 's/"tag_name": "//')
if [ -z "$LATEST_RELEASE" ]; then
echo "Could not extract the tag name from the response"
exit 1
fi
echo "LATEST_RELEASE => ${LATEST_RELEASE}"
echo "DOWNLOAD ADDRESS => https://github.com/containers/podman/releases/download/${LATEST_RELEASE}/podman-installer-macos-${ARCH}.pkg"
# echo "LATEST_RELEASE => ${LATEST_RELEASE}"
# echo "DOWNLOAD ADDRESS => https://github.com/containers/podman/releases/download/${LATEST_RELEASE}/podman-installer-macos-${ARCH}.pkg"
echo "DOWNLOAD ADDRESS V2 => https://github.com/containers/podman/releases/latest/download/podman-installer-macos-${ARCH}.pkg"
echo "CURL COMMAND =>"
curl -LO -o ./podman-installer-macos-${ARCH}.pkg https://github.com/containers/podman/releases/download/${LATEST_RELEASE}/podman-installer-macos-${ARCH}.pkg
# curl -LO -o ./podman-installer-macos-${ARCH}.pkg https://github.com/containers/podman/releases/download/${LATEST_RELEASE}/podman-installer-macos-${ARCH}.pkg
curl -LO https://github.com/containers/podman/releases/latest/download/podman-installer-macos-${ARCH}.pkg
echo "INSTALL PACKAGED INSTALLER =>"
sudo installer -pkg ./podman-installer-macos-${ARCH}.pkg -target /
sudo installer -pkg podman-installer-macos-${ARCH}.pkg -target /
echo "ADD PODMAN DIRECTORY (/opt/podman/bin/podman) TO PATH =>"
PODMAN_PATH_FULL=$(which podman)
PODMAN_PATH=$(dirname $(which podman))
Expand Down

0 comments on commit d18de7f

Please sign in to comment.