Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
49 changes: 49 additions & 0 deletions .github/workflows/kairos-ubuntu-22-lts.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
---
name: Build Kairos Ubuntu 22 LTS

on: # yamllint disable-line rule:truthy
push:
branches:
- main
paths:
- images/kairos-ubuntu-22-lts/**
pull_request:
branches:
- main
paths:
- images/kairos-ubuntu-22-lts/**

jobs:
build-container:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write

steps:
- uses: earthly/actions-setup@v1.0.8
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
# renovate: datasource=docker depName=earthly/earthly
version: "0.7.19"
- uses: actions/checkout@v4
- uses: docker/setup-qemu-action@v2
Comment thread
sdwilsh marked this conversation as resolved.

- name: Login to GitHub Container Hub
if: github.event_name != 'pull_request'
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Build Image
env:
EARTHLY_CI: true
run: earthly ./images/kairos-ubuntu-22-lts/+image

- name: Push Image
env:
EARTHLY_CI: true
if: github.event_name != 'pull_request'
run: earthly ./images/kairos-ubuntu-22-lts/+push
1 change: 1 addition & 0 deletions images/Earthfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,5 @@ VERSION 0.7
FROM alpine

all:
BUILD ./kairos-ubuntu-22-lts/+image
BUILD ./usb-image/+image
50 changes: 50 additions & 0 deletions images/kairos-ubuntu-22-lts/Earthfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
VERSION 0.7
FROM alpine

# renovate: datasource=github-releases depName=k3s-io/k3s versioning=docker
ARG --global K3S_VERSION=v1.27.3-k3s1
# renovate: datasource=docker depName=kairos/core-ubuntu-22-lts
ARG --global KAIROS_VERSION=v2.4.0

image:
BUILD +image-generic \
--PLATFORM=linux/amd64 \
--REPOSITORY=quay.io/kairos/kairos-ubuntu-22-lts
BUILD +image-generic \
--PLATFORM=linux/arm64 \
--REPOSITORY=quay.io/kairos/kairos-ubuntu-22-lts-arm-rpi

push:
BUILD +push-generic \
--PLATFORM=linux/amd64 \
--REPOSITORY=quay.io/kairos/kairos-ubuntu-22-lts \
--TAG=$KAIROS_VERSION
BUILD +push-generic \
--PLATFORM=linux/arm64 \
--REPOSITORY=quay.io/kairos/kairos-ubuntu-22-lts-arm-rpi \
--TAG=$KAIROS_VERSION

image-generic:
ARG PLATFORM
ARG REPOSITORY
FROM --platform=$PLATFORM $REPOSITORY:$KAIROS_VERSION-k3s$K3S_VERSION
# This is not needed after Kairos version 2.4 because it was fixed:
# https://github.com/kairos-io/kairos/pull/1855
RUN mkdir -p /var/cache/apt/archives/partial

# Get Package Manager Updates
RUN apt-get update

# Install Additional Packages
RUN apt-get install -y --no-install-recommends \
vim

# Cleanup
RUN apt-get clean && rm -rf /var/lib/apt/lists/*

push-generic:
ARG PLATFORM
ARG REPOSITORY
ARG TAG
FROM +image-generic --PLATFORM=$PLATFORM --REPOSITORY=$REPOSITORY
SAVE IMAGE --push ghcr.io/marinatedconcrete/kairos-ubuntu-22-lts:$TAG
20 changes: 20 additions & 0 deletions renovate.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,26 @@
"#\\s*renovate:\\s*datasource=(?<datasource>.*?)\\s+depName=(?<depName>.*?)(\\s+versioning=(?<versioning>.*?))?\\s+ARG\\s+.+_VERSION=(?<currentValue>.*?)\\s"
],
"versioningTemplate": "{{#if versioning}}{{versioning}}{{else}}semver{{/if}}"
},
{
"customType": "regex",
"fileMatch": [
"^earthly\\.sh$"
],
"datasourceTemplate": "docker",
"depNameTemplate": "earthly/earthly",
"matchStrings": [
"earthly\\/earthly:(?<currentValue>.*?)\\s"
]
},
{
"customType": "regex",
"fileMatch": [
"^.*\\.yml$"
],
"matchStrings": [
"#\\s*renovate:\\s*datasource=(?<datasource>.*?)\\s+depName=(?<depName>.*?)\\s+version:\\s+\"(?<currentValue>.*?)\""
]
}
]
}