Skip to content

fix job names, comment out buildx #19

fix job names, comment out buildx

fix job names, comment out buildx #19

Workflow file for this run

name: Build & publish lmnr images
on:
push:
branches:
- test-action
env:
REGISTRY_GH: ghcr.io
jobs:
build-push:
strategy:
fail-fast: false
matrix:
arch: [
# { target: linux/arm64, runs-on: macos-latest },
{ target: linux/amd64, runs-on: ubuntu-latest }
]
img-config: [
{ dockerfile: ./app-server/Dockerfile, context: ./app-server, image: ghcr.io/lmnr-ai/app-server },
{ dockerfile: ./frontend/Dockerfile, context: ./frontend, image: ghcr.io/lmnr-ai/frontend },
{ dockerfile: ./semantic-search-service/Dockerfile, context: ./semantic-search-service, image: ghcr.io/lmnr-ai/semantic-search-service }
]
runs-on: ${{ matrix.arch.runs-on }}
permissions:
contents: read
packages: write
attestations: write
id-token: write
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Log in to the Container registry
uses: docker/login-action@v3
with:
registry: ${{ env.REGISTRY_GH }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
# - name: Set up Docker Buildx
# uses: docker/setup-buildx-action@v3
- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@v5
with:
images: ${{ matrix.image }}
- name: Build and push Docker images
id: push
uses: docker/build-push-action@v6
with:
context: ${{ matrix.img-config.context }}
file: ${{ matrix.img-config.dockerfile }}
push: false
# platforms: ${{ matrix.arch.target }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
combine-images:
runs-on: ubuntu-latest
needs: build-push
permissions:
contents: read
packages: write
id-token: write
steps:
- name: Log in to the Container registry
uses: docker/login-action@v3
with:
registry: ${{ env.REGISTRY_GH }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
# - name: Combine amd64 and arm64 images into a multi-platform manifest
# run: |
# docker buildx imagetools create \
# --tag ${{ matrix.img-config.image }}:${{ steps.meta.outputs.tags }} \
# ${{ matrix.img-config.image }}:amd64 ${{ matrix.img-config.image }}:arm64
- name: Generate artifact attestation
uses: actions/attest-build-provenance@v1
with:
subject-name: ${{ matrix.image }}
subject-digest: ${{ steps.push.outputs.digest }}
push-to-registry: false