feat: Test building with swift:slim, as a matrix strategy in ci.
Some checks failed
Create and publish a Docker image / build-and-push-image (latest) (push) Failing after 35s
Create and publish a Docker image / build-and-push-image (slim) (push) Failing after 35s

This commit is contained in:
2025-11-12 14:16:01 -05:00
parent ed7ae83a9d
commit 2286d8a63b
3 changed files with 11 additions and 3 deletions

View File

@@ -15,6 +15,9 @@ env:
# There is a single job in this workflow. It's configured to run on the latest available version of Ubuntu.
jobs:
build-and-push-image:
strategy:
matrix:
version: ["latest", "slim"]
runs-on: ubuntu-latest
# Sets the permissions granted to the `GITHUB_TOKEN` for the actions in this job.
permissions:
@@ -48,6 +51,7 @@ jobs:
tags: |
type=ref,event=branch
type=sha
type=raw,${{ matrix.version }}
- name: Build and push Docker image
id: push
uses: docker/build-push-action@v6
@@ -55,5 +59,7 @@ jobs:
context: .
file: Dockerfile
push: true
build-args: |
SWIFT_VERSION="swift:${{ matrix.version }}"
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}

View File

@@ -50,7 +50,7 @@ jobs:
type=ref,event=branch
type=semver,pattern={{version}}
type=sha
type=raw,value=latest
type=raw,value=${{ matrix.version }}
- name: Build and push Docker image
id: push
uses: docker/build-push-action@v6

View File

@@ -1,4 +1,6 @@
FROM docker.io/swift:latest AS build
ARG SWIFT_VERSION="swift:latest"
FROM docker.io/${SWIFT_VERSION} AS build
RUN export DEBIAN_FRONTEND=noninteractive DEBCONF_NONINTERACTIVE_SEEN=true \
&& apt-get -q update \
@@ -13,7 +15,7 @@ RUN rustup default stable && \
/root/.cargo/bin/bob install nightly && \
/root/.cargo/bin/bob use nightly
FROM docker.io/swift:latest
FROM docker.io/${SWIFT_VERSION}
RUN export DEBIAN_FRONTEND=noninteractive DEBCONF_NONINTERACTIVE_SEEN=true \
&& apt-get -q update \