[V2] feat: Dockerfile for each components #8
Workflow file for this run
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: Build & Push Flyte Core v2 Images | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} | |
| cancel-in-progress: true | |
| on: | |
| push: | |
| branches: | |
| - v2 | |
| paths: | |
| - "docker/Dockerfile.*" | |
| - "docker/docker-bake.hcl" | |
| - "actions/**" | |
| - "cache_service/**" | |
| - "dataproxy/**" | |
| - "events/**" | |
| - "executor/**" | |
| - "runs/**" | |
| - "flytestdlib/**" | |
| - "flyteplugins/**" | |
| - "flyteidl2/**" | |
| - "gen/**" | |
| - "go.mod" | |
| - "go.sum" | |
| pull_request: | |
| branches: | |
| - v2 | |
| paths: | |
| - "docker/Dockerfile.*" | |
| - "docker/docker-bake.hcl" | |
| - "actions/**" | |
| - "cache_service/**" | |
| - "dataproxy/**" | |
| - "events/**" | |
| - "executor/**" | |
| - "runs/**" | |
| - "flytestdlib/**" | |
| - "flyteplugins/**" | |
| - "flyteidl2/**" | |
| - "gen/**" | |
| - "go.mod" | |
| - "go.sum" | |
| jobs: | |
| prepare: | |
| runs-on: ubuntu-latest | |
| outputs: | |
| matrix: ${{ steps.generate.outputs.matrix }} | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v6 | |
| with: | |
| sparse-checkout: docker/docker-bake.hcl | |
| sparse-checkout-cone-mode: false | |
| - name: Generate matrix | |
| id: generate | |
| uses: docker/bake-action/subaction/matrix@v7 | |
| with: | |
| files: docker-bake.hcl | |
| target: default | |
| build-and-push: | |
| needs: prepare | |
| runs-on: ubuntu-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: ${{ fromJson(needs.prepare.outputs.matrix) }} | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v6 | |
| - name: Set up QEMU | |
| uses: docker/setup-qemu-action@v4 | |
| - name: Set up Docker Buildx | |
| uses: docker/setup-buildx-action@v4 | |
| - name: Login to GitHub Container Registry | |
| if: github.event_name == 'push' | |
| uses: docker/login-action@v4 | |
| with: | |
| registry: ghcr.io | |
| username: ${{ secrets.FLYTE_BOT_USERNAME }} | |
| password: ${{ secrets.FLYTE_BOT_PAT }} | |
| - name: Set short Git SHA as tag | |
| run: echo "SHORT_SHA=$(git rev-parse --short HEAD)" >> $GITHUB_ENV | |
| - name: Build multi-arch image (PR) | |
| if: github.event_name == 'pull_request' | |
| uses: docker/bake-action@v7 | |
| with: | |
| source: . | |
| files: docker/docker-bake.hcl | |
| targets: default | |
| set: | | |
| *.args.tags="ghcr.io/flyteorg/flyte/${{ matrix.target }}:${{ env.SHORT_SHA }}" | |
| - name: Build and push images | |
| if: github.event_name == 'push' | |
| uses: docker/bake-action@v7 | |
| with: | |
| source: . | |
| files: docker/docker-bake.hcl | |
| push: true | |
| targets: default | |
| set: | | |
| *.args.tags="ghcr.io/flyteorg/flyte/${{ matrix.target }}:${{ env.SHORT_SHA }}" |