Repository navigation
chore(ci): Flutter 3.47.7 #5
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: Dev container image | |
| # Publishes ghcr.io/queryahub/querya-devcontainer (GitHub Packages) so the dev | |
| # container and Codespaces start from a prebuilt layer cache instead of | |
| # rebuilding the Flutter + Linux desktop toolchain from scratch. | |
| # | |
| # Pull requests only build and smoke-test the image, they never push. | |
| on: | |
| push: | |
| branches: [main, dev] | |
| paths: | |
| - .devcontainer/Dockerfile | |
| - .github/workflows/devcontainer-image.yml | |
| pull_request: | |
| paths: | |
| - .devcontainer/Dockerfile | |
| - .github/workflows/devcontainer-image.yml | |
| schedule: | |
| - cron: "0 5 * * 1" # weekly: pick up base-image and apt security updates | |
| workflow_dispatch: | |
| permissions: | |
| contents: read | |
| packages: write | |
| concurrency: | |
| group: devcontainer-image-${{ github.ref }} | |
| cancel-in-progress: true | |
| env: | |
| IMAGE: ghcr.io/queryahub/querya-devcontainer | |
| jobs: | |
| image: | |
| name: Build and push querya-devcontainer | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Flutter version from the Dockerfile | |
| id: flutter | |
| run: | | |
| v=$(sed -n 's#^ARG FLUTTER_VERSION=\(.*\)$#\1#p' .devcontainer/Dockerfile | head -n1) | |
| test -n "$v" | |
| echo "version=$v" >> "$GITHUB_OUTPUT" | |
| - uses: docker/setup-buildx-action@v3 | |
| - uses: docker/login-action@v3 | |
| if: github.event_name != 'pull_request' | |
| with: | |
| registry: ghcr.io | |
| username: ${{ github.actor }} | |
| password: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Build (loaded locally for the smoke test) | |
| uses: docker/build-push-action@v6 | |
| with: | |
| context: .devcontainer | |
| file: .devcontainer/Dockerfile | |
| load: true | |
| tags: querya-devcontainer:test | |
| cache-from: type=gha | |
| cache-to: type=gha,mode=max | |
| labels: | | |
| org.opencontainers.image.source=https://github.com/${{ github.repository }} | |
| org.opencontainers.image.description=Querya Desktop dev container (Flutter ${{ steps.flutter.outputs.version }} + Linux desktop toolchain) | |
| org.opencontainers.image.licenses=MIT | |
| - name: Smoke test | |
| run: | | |
| set -euo pipefail | |
| docker run --rm querya-devcontainer:test flutter --version | tee /dev/stderr | grep -q "Flutter ${{ steps.flutter.outputs.version }}" | |
| docker run --rm querya-devcontainer:test bwrap --version | |
| docker run --rm querya-devcontainer:test socat -V | |
| docker run --rm querya-devcontainer:test docker --version | |
| docker run --rm querya-devcontainer:test docker compose version | |
| docker run --rm querya-devcontainer:test bash -c 'clang --version && cmake --version && ninja --version && pkg-config --exists gtk+-3.0 libsecret-1' | |
| - name: Push | |
| if: github.event_name != 'pull_request' | |
| uses: docker/build-push-action@v6 | |
| with: | |
| context: .devcontainer | |
| file: .devcontainer/Dockerfile | |
| push: true | |
| cache-from: type=gha | |
| tags: | | |
| ${{ env.IMAGE }}:latest | |
| ${{ env.IMAGE }}:flutter-${{ steps.flutter.outputs.version }} | |
| labels: | | |
| org.opencontainers.image.source=https://github.com/${{ github.repository }} | |
| org.opencontainers.image.description=Querya Desktop dev container (Flutter ${{ steps.flutter.outputs.version }} + Linux desktop toolchain) | |
| org.opencontainers.image.licenses=MIT |