File tree Expand file tree Collapse file tree 1 file changed +7
-4
lines changed Expand file tree Collapse file tree 1 file changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -54,14 +54,17 @@ jobs:
5454 OVERRIDE_IMG_TAG : ${{ github.event.inputs.override_image_tag }}
5555 run : |
5656 if [[ "$OVERRIDE_IMG_TAG" == "" ]]; then
57- echo "Fetching latest version from $$ {{ env.REGISTRY }}/{{ env.IMAGE }}..."
57+ echo "Fetching latest version from ${{ env.REGISTRY }}/$ {{ env.IMAGE }}..."
5858
5959 # Get authentication token for GHCR
6060 TOKEN=$(echo ${{ secrets.GITHUB_TOKEN }} | base64)
6161
6262 # Fetch tags from GHCR API
63- LATEST_VERSION=$(curl -s -H "Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}" \
64- "https://${{ env.REGISTRY }}/v2/${{ env.IMAGE }}/tags/list" | \
63+ TAGS=$(curl -s -H "Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}" \
64+ "https://${{ env.REGISTRY }}/v2/${{ env.IMAGE }}/tags/list")
65+ echo "Image tags: ${TAGS}"
66+
67+ LATEST_VERSION=$(echo "${TAGS}" | \
6568 jq -r '.tags[]' | \
6669 grep -E '^[0-9]+\.[0-9]+\.[0-9]+$' | \
6770 sort -V | \
7679 IFS='.' read -r major minor patch <<< "$LATEST_VERSION"
7780 # Increment minor version
7881 NEW_PATCH=$((patch + 1))
79- NEW_VERSION="${major}.${minor}.0 "
82+ NEW_VERSION="${major}.${minor}.${NEW_PATCH} "
8083 fi
8184
8285 echo "New version: $NEW_VERSION"
You can’t perform that action at this time.
0 commit comments