diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index c93474f..1ae7502 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -6,24 +6,28 @@ jobs: main: runs-on: ubuntu-latest steps: - - name: Set up QEMU - uses: docker/setup-qemu-action@v2 + - name: Checkout repository + uses: actions/checkout@v3 - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v1 + uses: docker/setup-buildx-action@v2 - name: Login to quay Container Registry - uses: docker/login-action@v1 + uses: docker/login-action@v3 with: registry: quay.io username: kalkspace+github password: ${{ secrets.QUAY_TOKEN }} - - name: Inject slug/short variables - uses: rlespinasse/github-slug-action@v3.x + - name: Extract metadata (tags, labels) for Docker + id: meta + uses: docker/metadata-action@v5 + with: + images: quay.io/kalkspace/getraenkekasse - name: Build and push id: docker_build - uses: docker/build-push-action@v2 + uses: docker/build-push-action@v4 with: push: true - platforms: linux/amd64,linux/arm64 - tags: | - quay.io/${{ github.repository }}:${{ env.GITHUB_REF_SLUG }} - quay.io/${{ github.repository }}:latest + platforms: linux/arm64 + tags: ${{ steps.meta.outputs.tags }} + labels: ${{ steps.meta.outputs.labels }} + cache-from: type=gha + cache-to: type=gha,mode=max diff --git a/Dockerfile b/Dockerfile index 2f26637..b196861 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM node:18 as builder +FROM --platform=linux/amd64 node:18 as builder WORKDIR /src