feat: Test building with swift:slim, as a matrix strategy in ci.
This commit is contained in:
@@ -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 }}
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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 \
|
||||
|
||||
Reference in New Issue
Block a user