Dart Docker Check Tags on DockerHub #604
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | name: Dart Docker Check Tags on DockerHub | |
| on: | |
| schedule: | |
| - cron: '04 8 * * *' # At 0804 each day | |
| permissions: | |
| contents: read | |
| defaults: | |
| run: | |
| shell: "bash -Eeuo pipefail -x {0}" | |
| jobs: | |
| check-tags: | |
| name: Check Tags | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 | |
| with: | |
| sparse-checkout: | | |
| versions.json | |
| sparse-checkout-cone-mode: false | |
| - name: Check Tags on DockerHub | |
| run: | | |
| channels=( stable beta ) | |
| for channel in "${channels[@]}" | |
| do | |
| echo "Testing tags for ${channel} channel" | |
| DART_VERSION=$(cat versions.json | jq -r .${channel}.version) | |
| echo "Looking for Dart version ${DART_VERSION}" | |
| docker buildx imagetools inspect dart:${DART_VERSION} --format \ | |
| "{{json .Manifest}}" > ${channel}_manifest | |
| cat versions.json | jq -r ".${channel}.sha256 | keys | .[]" | \ | |
| sed s/x64/amd64/ | sort > ${channel}_expected | |
| cat ${channel}_manifest | jq -r \ | |
| '[.manifests[].platform.architecture] | sort | .[]' \ | |
| > ${channel}_found | |
| diff ${channel}_expected ${channel}_found | |
| done |