Skip to content

Commit

Permalink
Autobuild
Browse files Browse the repository at this point in the history
Signed-off-by: Itxaka <[email protected]>
  • Loading branch information
Itxaka committed Dec 3, 2023
1 parent 1ed4111 commit 59d52b8
Show file tree
Hide file tree
Showing 4 changed files with 76 additions and 74 deletions.
44 changes: 44 additions & 0 deletions .github/workflows/pr.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: Build PR 🔧

on:
pull_request:
push:
branches:
- master
- main

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up QEMU
uses: docker/setup-qemu-action@master
with:
platforms: all
- name: Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v3
- name: Docker meta
id: meta
uses: docker/metadata-action@v5
with:
images: |
ttl.sh/itxaka
tags: |
type=schedule
type=ref,event=branch
type=ref,event=pr
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
type=semver,pattern={{major}}
type=sha
- name: Build and push
uses: docker/build-push-action@v5
with:
platforms: linux/amd64,linux/arm64
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}


51 changes: 30 additions & 21 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,24 +1,26 @@
FROM quay.io/luet/base:0.35.0 as luet

# Common packages for all images
FROM alpine as framework_base
ENV LUET_NOLOCK=true
COPY --from=luet /usr/bin/luet /usr/bin/luet
COPY repositories.yaml /repositories.yaml
RUN luet install -y --config repositories.yaml --system-target /framework \
static/grub-config \
dracut/immucore \
system/suc-upgrade \
system/grub2-efi \
static/kairos-overlay-files \
system/kcrypt \
system/kcrypt-challenger \
system/immucore \
system/kairos-agent \
init-svc/openrc \
initrd/alpine \
init-svc/systemd \
dracut/kairos-network \
dracut/kairos-sysext
dracut/immucore \
dracut/kairos-network \
dracut/kairos-sysext \
system/suc-upgrade \
system/grub2-efi \
system/kcrypt \
system/kcrypt-challenger \
system/immucore \
system/kairos-agent \
system/kcrypt \
static/grub-config \
static/kairos-overlay-files \
initrd/alpine


RUN mkdir -p /framework/etc/kairos/
RUN luet database --system-target /framework get-all-installed --output /framework/etc/kairos/versions.yaml

Expand All @@ -27,19 +29,26 @@ RUN luet cleanup --system-target /framework
RUN rm -rf /framework/var/luet
RUN rm -rf /framework/var/cache




FROM scratch as framework
COPY --from=framework_base /framework /framework


# on fips, overwrite the binaries with its fips version
FROM framework_base as framework_base_fips
RUN luet install -y --config repositories.yaml --system-target /framework \
fips/kcrypt \
fips/kcrypt-challenger \
fips/immucore \
fips/kairos-agent

RUN mkdir -p /framework/etc/kairos/
RUN luet database --system-target /framework get-all-installed --output /framework/etc/kairos/versions.yaml

# luet cleanup
RUN luet cleanup --system-target /framework
RUN rm -rf /framework/var/luet
RUN rm -rf /framework/var/cache


# Final images
FROM scratch as framework
COPY --from=framework_base /framework /framework

FROM scratch as framework_fips
COPY --from=framework_base_fips /framework /framework
51 changes: 0 additions & 51 deletions kairos_setup

This file was deleted.

4 changes: 2 additions & 2 deletions repositories.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ repositories:
priority: 2
urls:
- "quay.io/kairos/packages"
reference: 20231019093159-repository.yaml
reference: 20231123154748-repository.yaml
- !!merge <<: *kairos
arch: arm64
urls:
- "quay.io/kairos/packages-arm64"
reference: 20231019092540-repository.yaml
reference: 20231202000933-repository.yaml

0 comments on commit 59d52b8

Please sign in to comment.