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:
|
permissions:
|
||||||
contents: read
|
contents: read
|
||||||
|
|
||||||
|
env:
|
||||||
|
IMAGE_NAME: flutter-sdk
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build-and-push:
|
build-and-push:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
@ -14,13 +17,13 @@ jobs:
|
|||||||
matrix:
|
matrix:
|
||||||
include:
|
include:
|
||||||
- dockerfile: Dockerfile
|
- dockerfile: Dockerfile
|
||||||
image_name: gpb-flutter-sdk-web
|
variant: web
|
||||||
description: Minimal Flutter SDK for Web/WASM CI builds
|
description: Minimal Flutter SDK for Web/WASM CI builds
|
||||||
- dockerfile: Dockerfile.android
|
- dockerfile: Dockerfile.android
|
||||||
image_name: gpb-flutter-sdk-android
|
variant: android
|
||||||
description: Flutter SDK for Android CI builds
|
description: Flutter SDK for Android CI builds
|
||||||
- dockerfile: Dockerfile.linux
|
- dockerfile: Dockerfile.linux
|
||||||
image_name: gpb-flutter-sdk-linux
|
variant: linux
|
||||||
description: Flutter SDK for Linux desktop CI builds
|
description: Flutter SDK for Linux desktop CI builds
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout code
|
- name: Checkout code
|
||||||
@ -34,12 +37,12 @@ jobs:
|
|||||||
FLUTTER_VERSION=$(curl -fsSL https://storage.googleapis.com/flutter_infra_release/releases/releases_linux.json \
|
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')
|
| jq -r '.current_release.stable as $hash | .releases[] | select(.hash == $hash and .channel == "stable") | .version')
|
||||||
echo "flutter_version=${FLUTTER_VERSION}" >> $GITHUB_OUTPUT
|
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"
|
echo "Using latest Flutter stable ${FLUTTER_VERSION} for pre-release test"
|
||||||
else
|
else
|
||||||
# Full release: use the release tag as the Flutter version
|
# Full release: use the release tag as the Flutter version
|
||||||
echo "flutter_version=${{ github.event.release.tag_name }}" >> $GITHUB_OUTPUT
|
echo "flutter_version=${{ github.event.release.tag_name }}" >> $GITHUB_OUTPUT
|
||||||
echo "tag=latest" >> $GITHUB_OUTPUT
|
echo "tag=${{ matrix.variant }}-latest" >> $GITHUB_OUTPUT
|
||||||
fi
|
fi
|
||||||
|
|
||||||
- name: Set up Docker Buildx
|
- name: Set up Docker Buildx
|
||||||
@ -61,7 +64,7 @@ jobs:
|
|||||||
load: true
|
load: true
|
||||||
build-args: |
|
build-args: |
|
||||||
FLUTTER_VERSION=${{ steps.version.outputs.flutter_version }}
|
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
|
- name: Install Docker Scout
|
||||||
run: |
|
run: |
|
||||||
@ -70,7 +73,7 @@ jobs:
|
|||||||
|
|
||||||
- name: Docker Scout CVE Scan
|
- name: Docker Scout CVE Scan
|
||||||
run: |
|
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
|
- name: Build and push with attestations
|
||||||
uses: docker/build-push-action@v5
|
uses: docker/build-push-action@v5
|
||||||
@ -84,10 +87,10 @@ jobs:
|
|||||||
build-args: |
|
build-args: |
|
||||||
FLUTTER_VERSION=${{ steps.version.outputs.flutter_version }}
|
FLUTTER_VERSION=${{ steps.version.outputs.flutter_version }}
|
||||||
tags: |
|
tags: |
|
||||||
${{ vars.REGISTRY }}/${{ matrix.image_name }}:${{ steps.version.outputs.flutter_version }}
|
${{ vars.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ matrix.variant }}-${{ steps.version.outputs.flutter_version }}
|
||||||
${{ vars.REGISTRY }}/${{ matrix.image_name }}:${{ steps.version.outputs.tag }}
|
${{ vars.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ steps.version.outputs.tag }}
|
||||||
labels: |
|
labels: |
|
||||||
org.opencontainers.image.title=${{ matrix.image_name }}
|
org.opencontainers.image.title=${{ env.IMAGE_NAME }}
|
||||||
org.opencontainers.image.description=${{ matrix.description }}
|
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 }}
|
org.opencontainers.image.revision=${{ github.sha }}
|
||||||
|
|||||||
@ -8,6 +8,9 @@ permissions:
|
|||||||
contents: read
|
contents: read
|
||||||
pull-requests: write
|
pull-requests: write
|
||||||
|
|
||||||
|
env:
|
||||||
|
IMAGE_NAME: flutter-sdk
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
scout:
|
scout:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
@ -15,11 +18,11 @@ jobs:
|
|||||||
matrix:
|
matrix:
|
||||||
include:
|
include:
|
||||||
- dockerfile: Dockerfile
|
- dockerfile: Dockerfile
|
||||||
image_name: gpb-flutter-sdk-web
|
variant: web
|
||||||
- dockerfile: Dockerfile.android
|
- dockerfile: Dockerfile.android
|
||||||
image_name: gpb-flutter-sdk-android
|
variant: android
|
||||||
- dockerfile: Dockerfile.linux
|
- dockerfile: Dockerfile.linux
|
||||||
image_name: gpb-flutter-sdk-linux
|
variant: linux
|
||||||
steps:
|
steps:
|
||||||
- name: Log in to DockerHub
|
- name: Log in to DockerHub
|
||||||
uses: docker/login-action@v3
|
uses: docker/login-action@v3
|
||||||
@ -30,12 +33,12 @@ jobs:
|
|||||||
- name: Check if latest image exists
|
- name: Check if latest image exists
|
||||||
id: should_run
|
id: should_run
|
||||||
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 "run=true" >> $GITHUB_OUTPUT
|
||||||
echo "Latest ${{ matrix.image_name }} found, Scout compare will run"
|
echo "${{ matrix.variant }}-latest found, Scout compare will run"
|
||||||
else
|
else
|
||||||
echo "run=false" >> $GITHUB_OUTPUT
|
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
|
fi
|
||||||
|
|
||||||
- name: Checkout code
|
- name: Checkout code
|
||||||
@ -55,7 +58,7 @@ jobs:
|
|||||||
platforms: linux/amd64
|
platforms: linux/amd64
|
||||||
push: false
|
push: false
|
||||||
load: true
|
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
|
- name: Install Docker Scout
|
||||||
if: steps.should_run.outputs.run == 'true'
|
if: steps.should_run.outputs.run == 'true'
|
||||||
@ -66,4 +69,4 @@ jobs:
|
|||||||
- name: Docker Scout Compare
|
- name: Docker Scout Compare
|
||||||
if: steps.should_run.outputs.run == 'true'
|
if: steps.should_run.outputs.run == 'true'
|
||||||
run: |
|
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
|
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.description="Minimal Flutter SDK for Web/WASM CI builds"
|
||||||
LABEL org.opencontainers.image.version="${FLUTTER_VERSION}"
|
LABEL org.opencontainers.image.version="${FLUTTER_VERSION}"
|
||||||
|
|
||||||
|
|||||||
@ -5,7 +5,7 @@ ARG ANDROID_SDK_TOOLS_VERSION=11076708
|
|||||||
ARG ANDROID_COMPILE_SDK=35
|
ARG ANDROID_COMPILE_SDK=35
|
||||||
ARG ANDROID_BUILD_TOOLS=35.0.1
|
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.description="Flutter SDK for Android CI builds"
|
||||||
LABEL org.opencontainers.image.version="${FLUTTER_VERSION}"
|
LABEL org.opencontainers.image.version="${FLUTTER_VERSION}"
|
||||||
|
|
||||||
|
|||||||
@ -2,7 +2,7 @@ FROM debian:bookworm-slim
|
|||||||
|
|
||||||
ARG FLUTTER_VERSION=3.38.9
|
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.description="Flutter SDK for Linux desktop CI builds"
|
||||||
LABEL org.opencontainers.image.version="${FLUTTER_VERSION}"
|
LABEL org.opencontainers.image.version="${FLUTTER_VERSION}"
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user