Skip to content

Commit 611ba08

Browse files
committed
improve version matching
1 parent 48be9ca commit 611ba08

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

.github/workflows/docker-build-and-push-cron.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,13 +34,13 @@ jobs:
3434
- name: Get versions
3535
id: GET_VERSIONS
3636
run: |
37-
echo SDK_VERSION="$(curl -s https://api.github.com/repos/microsoftgraph/msgraph-sdk-powershell/releases | jq '.[0] | .name' -r | grep -Eo '([0-9]+)(\.?[0-9]+)*' | head -1)" >> $GITHUB_OUTPUT
38-
echo DOCKER_VERSION="$(curl -s 'https://hub.docker.com/v2/repositories/rakheshster/powershell-msgraph/tags' -H 'Content-Type: application/json' | jq -r '.results[] | .name' | sort -Vr | head -n 1)" >> $GITHUB_OUTPUT
37+
echo SDK_VERSION="$(curl -s https://api.github.com/repos/microsoftgraph/msgraph-sdk-powershell/releases | jq '.[] | .name' | sort -Vr | head -n 1 | tr -d "\"")" >> $GITHUB_OUTPUT
38+
echo DOCKERHUB_VERSION="$(curl -s 'https://hub.docker.com/v2/repositories/rakheshster/powershell-msgraph/tags' -H 'Content-Type: application/json' | jq -r '.results[] | .name' | sort -Vr | head -n 1)" >> $GITHUB_OUTPUT
3939
4040
- name: Exit if no update available
4141
id: EXIT_ACTION
4242
run: |
43-
if [[ "${{ steps.GET_VERSIONS.outputs.SDK_VERSION }}" == "${{ steps.GET_VERSIONS.outputs.DOCKER_VERSION }}" ]]; then
43+
if [[ "${{ steps.GET_VERSIONS.outputs.SDK_VERSION }}" == "${{ steps.GET_VERSIONS.outputs.DOCKERHUB_VERSION }}" ]]; then
4444
echo "No update needed"
4545
echo SHOULD_RUN=false >> $GITHUB_OUTPUT
4646
else

0 commit comments

Comments
 (0)