Consolidate all variants under single flutter-sdk image with tag prefixes
Some checks failed
Build and Push Flutter SDK Image / build-and-push (Flutter SDK for Android CI builds, Dockerfile.android, android) (release) Failing after 8s
Build and Push Flutter SDK Image / build-and-push (Flutter SDK for Linux desktop CI builds, Dockerfile.linux, linux) (release) Failing after 8s
Build and Push Flutter SDK Image / build-and-push (Minimal Flutter SDK for Web/WASM CI builds, Dockerfile, web) (release) Failing after 12s
Some checks failed
Build and Push Flutter SDK Image / build-and-push (Flutter SDK for Android CI builds, Dockerfile.android, android) (release) Failing after 8s
Build and Push Flutter SDK Image / build-and-push (Flutter SDK for Linux desktop CI builds, Dockerfile.linux, linux) (release) Failing after 8s
Build and Push Flutter SDK Image / build-and-push (Minimal Flutter SDK for Web/WASM CI builds, Dockerfile, web) (release) Failing after 12s
All platform images now publish to svrnty/flutter-sdk with variant prefixed tags (web-3.38.9, android-latest, linux-dev, etc.) instead of separate image names per platform. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
parent
9c4100dce5
commit
0aa6a52988
@ -7,6 +7,9 @@ on:
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
env:
|
||||
IMAGE_NAME: flutter-sdk
|
||||
|
||||
jobs:
|
||||
build-and-push:
|
||||
runs-on: ubuntu-latest
|
||||
@ -14,13 +17,13 @@ jobs:
|
||||
matrix:
|
||||
include:
|
||||
- dockerfile: Dockerfile
|
||||
image_name: gpb-flutter-sdk-web
|
||||
variant: web
|
||||
description: Minimal Flutter SDK for Web/WASM CI builds
|
||||
- dockerfile: Dockerfile.android
|
||||
image_name: gpb-flutter-sdk-android
|
||||
variant: android
|
||||
description: Flutter SDK for Android CI builds
|
||||
- dockerfile: Dockerfile.linux
|
||||
image_name: gpb-flutter-sdk-linux
|
||||
variant: linux
|
||||
description: Flutter SDK for Linux desktop CI builds
|
||||
steps:
|
||||
- name: Checkout code
|
||||
@ -34,12 +37,12 @@ jobs:
|
||||
FLUTTER_VERSION=$(curl -fsSL https://storage.googleapis.com/flutter_infra_release/releases/releases_linux.json \
|
||||
| jq -r '.current_release.stable as $hash | .releases[] | select(.hash == $hash and .channel == "stable") | .version')
|
||||
echo "flutter_version=${FLUTTER_VERSION}" >> $GITHUB_OUTPUT
|
||||
echo "tag=dev" >> $GITHUB_OUTPUT
|
||||
echo "tag=${{ matrix.variant }}-dev" >> $GITHUB_OUTPUT
|
||||
echo "Using latest Flutter stable ${FLUTTER_VERSION} for pre-release test"
|
||||
else
|
||||
# Full release: use the release tag as the Flutter version
|
||||
echo "flutter_version=${{ github.event.release.tag_name }}" >> $GITHUB_OUTPUT
|
||||
echo "tag=latest" >> $GITHUB_OUTPUT
|
||||
echo "tag=${{ matrix.variant }}-latest" >> $GITHUB_OUTPUT
|
||||
fi
|
||||
|
||||
- name: Set up Docker Buildx
|
||||
@ -61,7 +64,7 @@ jobs:
|
||||
load: true
|
||||
build-args: |
|
||||
FLUTTER_VERSION=${{ steps.version.outputs.flutter_version }}
|
||||
tags: ${{ vars.REGISTRY }}/${{ matrix.image_name }}:${{ steps.version.outputs.flutter_version }}
|
||||
tags: ${{ vars.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ matrix.variant }}-${{ steps.version.outputs.flutter_version }}
|
||||
|
||||
- name: Install Docker Scout
|
||||
run: |
|
||||
@ -70,7 +73,7 @@ jobs:
|
||||
|
||||
- name: Docker Scout CVE Scan
|
||||
run: |
|
||||
docker scout cves ${{ vars.REGISTRY }}/${{ matrix.image_name }}:${{ steps.version.outputs.flutter_version }} --only-severity critical,high
|
||||
docker scout cves ${{ vars.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ matrix.variant }}-${{ steps.version.outputs.flutter_version }} --only-severity critical,high
|
||||
|
||||
- name: Build and push with attestations
|
||||
uses: docker/build-push-action@v5
|
||||
@ -84,10 +87,10 @@ jobs:
|
||||
build-args: |
|
||||
FLUTTER_VERSION=${{ steps.version.outputs.flutter_version }}
|
||||
tags: |
|
||||
${{ vars.REGISTRY }}/${{ matrix.image_name }}:${{ steps.version.outputs.flutter_version }}
|
||||
${{ vars.REGISTRY }}/${{ matrix.image_name }}:${{ steps.version.outputs.tag }}
|
||||
${{ vars.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ matrix.variant }}-${{ steps.version.outputs.flutter_version }}
|
||||
${{ vars.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ steps.version.outputs.tag }}
|
||||
labels: |
|
||||
org.opencontainers.image.title=${{ matrix.image_name }}
|
||||
org.opencontainers.image.title=${{ env.IMAGE_NAME }}
|
||||
org.opencontainers.image.description=${{ matrix.description }}
|
||||
org.opencontainers.image.version=${{ steps.version.outputs.flutter_version }}
|
||||
org.opencontainers.image.version=${{ matrix.variant }}-${{ steps.version.outputs.flutter_version }}
|
||||
org.opencontainers.image.revision=${{ github.sha }}
|
||||
|
||||
@ -8,6 +8,9 @@ permissions:
|
||||
contents: read
|
||||
pull-requests: write
|
||||
|
||||
env:
|
||||
IMAGE_NAME: flutter-sdk
|
||||
|
||||
jobs:
|
||||
scout:
|
||||
runs-on: ubuntu-latest
|
||||
@ -15,11 +18,11 @@ jobs:
|
||||
matrix:
|
||||
include:
|
||||
- dockerfile: Dockerfile
|
||||
image_name: gpb-flutter-sdk-web
|
||||
variant: web
|
||||
- dockerfile: Dockerfile.android
|
||||
image_name: gpb-flutter-sdk-android
|
||||
variant: android
|
||||
- dockerfile: Dockerfile.linux
|
||||
image_name: gpb-flutter-sdk-linux
|
||||
variant: linux
|
||||
steps:
|
||||
- name: Log in to DockerHub
|
||||
uses: docker/login-action@v3
|
||||
@ -30,12 +33,12 @@ jobs:
|
||||
- name: Check if latest image exists
|
||||
id: should_run
|
||||
run: |
|
||||
if docker manifest inspect ${{ vars.REGISTRY }}/${{ matrix.image_name }}:latest > /dev/null 2>&1; then
|
||||
if docker manifest inspect ${{ vars.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ matrix.variant }}-latest > /dev/null 2>&1; then
|
||||
echo "run=true" >> $GITHUB_OUTPUT
|
||||
echo "Latest ${{ matrix.image_name }} found, Scout compare will run"
|
||||
echo "${{ matrix.variant }}-latest found, Scout compare will run"
|
||||
else
|
||||
echo "run=false" >> $GITHUB_OUTPUT
|
||||
echo "No latest ${{ matrix.image_name }} found, skipping (nothing to compare against)"
|
||||
echo "No ${{ matrix.variant }}-latest found, skipping (nothing to compare against)"
|
||||
fi
|
||||
|
||||
- name: Checkout code
|
||||
@ -55,7 +58,7 @@ jobs:
|
||||
platforms: linux/amd64
|
||||
push: false
|
||||
load: true
|
||||
tags: ${{ vars.REGISTRY }}/${{ matrix.image_name }}:pr-${{ github.event.pull_request.number }}
|
||||
tags: ${{ vars.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ matrix.variant }}-pr-${{ github.event.pull_request.number }}
|
||||
|
||||
- name: Install Docker Scout
|
||||
if: steps.should_run.outputs.run == 'true'
|
||||
@ -66,4 +69,4 @@ jobs:
|
||||
- name: Docker Scout Compare
|
||||
if: steps.should_run.outputs.run == 'true'
|
||||
run: |
|
||||
docker scout compare ${{ vars.REGISTRY }}/${{ matrix.image_name }}:pr-${{ github.event.pull_request.number }} --to ${{ vars.REGISTRY }}/${{ matrix.image_name }}:latest --ignore-unchanged --only-severity critical,high
|
||||
docker scout compare ${{ vars.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ matrix.variant }}-pr-${{ github.event.pull_request.number }} --to ${{ vars.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ matrix.variant }}-latest --ignore-unchanged --only-severity critical,high
|
||||
|
||||
@ -2,7 +2,7 @@ FROM debian:bookworm-slim
|
||||
|
||||
ARG FLUTTER_VERSION=3.38.9
|
||||
|
||||
LABEL org.opencontainers.image.title="gpb-flutter-sdk-web"
|
||||
LABEL org.opencontainers.image.title="flutter-sdk"
|
||||
LABEL org.opencontainers.image.description="Minimal Flutter SDK for Web/WASM CI builds"
|
||||
LABEL org.opencontainers.image.version="${FLUTTER_VERSION}"
|
||||
|
||||
|
||||
@ -5,7 +5,7 @@ ARG ANDROID_SDK_TOOLS_VERSION=11076708
|
||||
ARG ANDROID_COMPILE_SDK=35
|
||||
ARG ANDROID_BUILD_TOOLS=35.0.1
|
||||
|
||||
LABEL org.opencontainers.image.title="gpb-flutter-sdk-android"
|
||||
LABEL org.opencontainers.image.title="flutter-sdk"
|
||||
LABEL org.opencontainers.image.description="Flutter SDK for Android CI builds"
|
||||
LABEL org.opencontainers.image.version="${FLUTTER_VERSION}"
|
||||
|
||||
|
||||
@ -2,7 +2,7 @@ FROM debian:bookworm-slim
|
||||
|
||||
ARG FLUTTER_VERSION=3.38.9
|
||||
|
||||
LABEL org.opencontainers.image.title="gpb-flutter-sdk-linux"
|
||||
LABEL org.opencontainers.image.title="flutter-sdk"
|
||||
LABEL org.opencontainers.image.description="Flutter SDK for Linux desktop CI builds"
|
||||
LABEL org.opencontainers.image.version="${FLUTTER_VERSION}"
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user