Skip to content

Commit

Permalink
Update auto_image.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
caleee committed Jun 1, 2024
1 parent 7f3aff9 commit 7dcf61a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion .github/workflows/auto_image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jobs:
id: extract_version
run: |
REPO=${{ secrets.DOCKERHUB_USERNAME }}/mosdns
LATEST_VERSION=$(curl -s https://hub.docker.com/v2/repositories/$REPO/tags/?page_size=100 | jq -r '.results | map(select(.name | test("^[0-9]+\\.[0-9]+\\.[0-9]+$"))) | sort_by(.name) | last | .name')
LATEST_VERSION=$(curl -s "https://hub.docker.com/v2/repositories/$REPO/tags/?page_size=100" | grep -oP '"name":\s*"\K[0-9]+\.[0-9]+\.[0-9]+' | sort -V | tail -n 1)
LATEST_VERSION=${LATEST_VERSION:-"1.0.0"}
VERSION=$(echo $LATEST_VERSION | awk -F. -v OFS=. '{$NF += 1 ; print}')
echo "VERSION=$VERSION" >> $GITHUB_ENV
Expand Down

0 comments on commit 7dcf61a

Please sign in to comment.