mirror of
https://github.com/gmeligio/flutter-docker-image.git
synced 2026-05-24 12:30:34 +00:00
792b91c445
- **`windows.Dockerfile`** — fixes the `COPY` source path from `./test/Windows.Tests.ps1` to `./test/windows/Windows.Tests.ps1` (root cause of the 12-month "in_progress forever" state); adds `COPY ./config/version.json` to the `test` stage; replaces the commented `CMD` with a real `CMD` so `docker run`/`docker compose run` invokes Pester without arguments. - **`test/windows/Windows.Tests.ps1`** — fixes the `VC.CMake.Project` pattern typo (`,versiona*` → `,version=*`) and standardises all three VS-component patterns to `,version=*`; adds a `Flutter version` test that reads `config/version.json` and asserts `flutter --version` inside the container reports the same version; adds a `Flutter doctor` test with a per-line parser (skip disabled platforms, fail on any non-`[✓]` for Windows toolchain lines, fail on `[✗]` elsewhere). - **`script/RunPester.ps1`** — forces `[Console]::OutputEncoding = UTF8` so the `[✓]`/`[!]`/`[✗]` doctor glyphs survive the `windows-2025` runner's default OEM codepage. - **`test/windows/`** — deletes the dead `ory/dockertest` Go skeleton (`main.go`, `main_test.go`, `go.mod`, `go.sum`) that was never wired into CI and had its only meaningful assertion commented out. - **`.github/workflows/windows.yml`** — deletes three commented-out blocks (`Scan with Docker Scout`, `Push to Docker Hub`, `validate_version` job referencing the deleted `config/version.cue`); drops the now-unused elevated permissions (`packages: write`, `pull-requests: write`, `security-events: write`). --------- Co-authored-by: verified-commit[bot] <180343340+verified-commit[bot]@users.noreply.github.com> Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
3.9 KiB
3.9 KiB
1. Add the release_windows job to release.yml
- 1.1 Open
.github/workflows/release.ymland add a new jobrelease_windowsafterrelease_android. Setruns-on: windows-2025,permissions.packages: write,env.IMAGE_REPOSITORY_NAME: flutter-windows,env.VERSION_MANIFEST: config/version.json. - 1.2 Add a
Checkout repositorystep using the same SHA-pinnedactions/checkoutalready in use elsewhere in the file. - 1.3 Add a
Read environment variables from the version manifeststep usingactions/github-scriptandscript/setEnvironmentVariables.js, identical torelease_android. - 1.4 Add a
Load image metadatastep usingdocker/metadata-actionwithimages:set to${{ env.IMAGE_REPOSITORY_PATH }},ghcr.io/${{ env.IMAGE_REPOSITORY_PATH }},quay.io/${{ env.IMAGE_REPOSITORY_PATH }}andtags: type=raw,value=${{ env.FLUTTER_VERSION }}.
2. Wire registry logins
- 2.1 Add
Login to Docker Hubstep usingdocker/login-actionwith${{ secrets.DOCKER_HUB_USERNAME }}/${{ secrets.DOCKER_HUB_TOKEN }}. - 2.2 Add
Login to GitHub Container Registrystep withregistry: ghcr.io,${{ github.actor }}/${{ github.token }}. - 2.3 Add
Login to Quay.iostep withregistry: quay.io,${{ secrets.QUAY_USERNAME }}/${{ secrets.QUAY_ROBOT_TOKEN }}.
3. Build and push the Windows image
- 3.1 Add a
Build imagestep runningdocker build . -f windows.Dockerfile --target flutter --build-arg flutter_version=${{ env.FLUTTER_VERSION }}followed bydocker tagcalls that apply each metadata-action tag to the local image. - 3.2 Add the OCI labels emitted by
metadata-actionto the build using--labelarguments (or pipe the labels via a script step that iterates${{ steps.metadata.outputs.labels }}). - 3.3 Add a
Push to registriesstep that runsdocker pushfor each tag in${{ steps.metadata.outputs.tags }}(one push per registry-prefixed tag).
4. Confirm parallelism and isolation from release_android
- 4.1 Verify the new job has no
needs:line and noif:line keying onrelease_androidoutcome — it must run in parallel. - 4.2 Verify the existing
update_description,record_image,set_bootstrap_image, andcreate_github_releasejobs stillneeds: release_androidonly, notrelease_windows.
5. Confirm gx pinning compliance
- 5.1 Confirm every
uses:action in the new job is already entered in.github/gx.toml(it should be, since they all appear inrelease_android). - 5.2 Run
gx tidylocally; the diff should be empty. If it isn't, commit the gx-managed updates with the change. - 5.3 Run
gx lintlocally to confirm SHA pinning is correct.
6. Pre-merge dry run
- 6.1 Push the branch and open a PR. The
pull_requestchecks do not exerciserelease.yml, so the PR is evaluated on YAML review only. - 6.2 After merge, use
workflow_dispatchto triggerrelease.ymlagainst the most recent stable Flutter tag. - 6.3 Confirm
release_windowsexits 0 and the three published manifests exist:docker manifest inspect docker.io/<org>/flutter-windows:<version>docker manifest inspect ghcr.io/<org>/flutter-windows:<version>docker manifest inspect quay.io/<org>/flutter-windows:<version>
- 6.4 Confirm
docker.io/<org>/flutter-android:<version>is unaffected by the workflow_dispatch run (its digest matches what was published at the original tag time).
7. Confirm OCI labels and version match
- 7.1 Run
docker pull docker.io/<org>/flutter-windows:<version>anddocker inspectit. - 7.2 Confirm
Labels["org.opencontainers.image.version"]equals<version>andLabels["org.opencontainers.image.revision"]equals the tag's commit SHA. - 7.3 Run the image and confirm
flutter --versionreports<version>.
8. Archive
- 8.1 After merge and successful first real (non-dispatch) release, archive this change so the
windows-image-releasespec is promoted toopenspec/specs/.