Skip to content

Dart Docker Check Tags on DockerHub #262

Dart Docker Check Tags on DockerHub

Dart Docker Check Tags on DockerHub #262

Workflow file for this run

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@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
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