Skip to content

Commit

Permalink
(github-actions) Update pub API endpoint to retrieve latest version o…
Browse files Browse the repository at this point in the history
…f pana
  • Loading branch information
axel-op committed Mar 1, 2024
1 parent c0dfe25 commit 192e469
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/docker-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,10 @@ jobs:
DART_VERSION: latest
GIT_FLUTTER: https://github.com/flutter/flutter.git
FLUTTER_BRANCH: stable
PANA_DOC: https://pub.dev/api/documentation/pana
PANA_DOC: https://pub.dev/api/packages/pana
run: |
CURRENT_FLUTTER=$(git ls-remote $GIT_FLUTTER refs/heads/$FLUTTER_BRANCH | cut -f 1)
CURRENT_PANA=$(curl -s $PANA_DOC | jq -r '.latestStableVersion')
CURRENT_PANA=$(curl -s $PANA_DOC | jq -r '.latest.version')
API_TOKEN=$(curl -s "https://auth.docker.io/token?scope=repository:$DART_IMAGE:pull&service=registry.docker.io" | jq -r '.token')
CURRENT_DART=$(curl -s -H "Authorization: Bearer $API_TOKEN" -H "Accept: application/vnd.docker.distribution.manifest.v2+json" "https://registry-1.docker.io/v2/$DART_IMAGE/manifests/$DART_VERSION" | jq -r '.config.digest')
PREVIOUS_FLUTTER=${{ steps.labels.outputs.fluttersha }}
Expand Down

0 comments on commit 192e469

Please sign in to comment.