Skip to content
Merged
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
48 changes: 31 additions & 17 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,49 +8,63 @@ on:

jobs:
build:
runs-on: depot-ubuntu-24.04
runs-on: ubuntu-24.04
strategy:
matrix:
os:
- ubuntu/jammy
- rocky-container/9
- ubuntu/noble
version:
- 1.27.15
- 1.28.11
- 1.29.6
- 1.30.2
- 1.31.1
- 1.33.1
steps:
- uses: actions/checkout@v4

- uses: astral-sh/setup-uv@v5
with:
enable-cache: true

- run: uv sync
- run: sudo apt-get install -y $(uv run bindep -b)

- run: sudo apt update && sudo apt install -y $(uv run bindep -b)

- uses: winterjung/split@7f51d99e7cc1f147f6f99be75acf5e641930af88 # v2.1.0
id: split
with:
msg: ${{ matrix.os }}
separator: "/"
- run: sudo chown root /bin/tar && sudo chmod u+s /bin/tar

- name: Create .cache directory so it doesn't get created with incorrect ownership
run: mkdir -p ~/.cache
if: ${{ steps.split.outputs._0 == 'ubuntu' }}

- name: Set image filename env var
run: echo "IMAGE_NAME=${{ steps.split.outputs._0 }}-${{ steps.split.outputs._1 }}-${{ matrix.version }}" >> "$GITHUB_ENV"

- uses: actions/cache@v4
with:
path: /home/runner/.cache/image-create
key: ${{ steps.split.outputs._0 }}-${{ steps.split.outputs._1 }}-${{ matrix.version }}-${{ github.head_ref || github.ref_name }}
key: ${{ env.IMAGE_NAME }}-${{ github.head_ref || github.ref_name }}
restore-keys: |
${{ steps.split.outputs._0 }}-${{ steps.split.outputs._1 }}-${{ matrix.version }}-${{ github.head_ref || github.ref_name }}
${{ steps.split.outputs._0 }}-${{ steps.split.outputs._1 }}-${{ matrix.version }}
${{ env.IMAGE_NAME }}-${{ github.head_ref || github.ref_name }}
${{ env.IMAGE_NAME }}
${{ steps.split.outputs._0 }}-${{ steps.split.outputs._1 }}
- run: uv run disk-image-create vm block-device-efi ${{ steps.split.outputs._0 }} kubernetes

- run: uv run disk-image-create -o "${IMAGE_NAME}.qcow2" vm block-device-efi ${{ steps.split.outputs._0 }} kubernetes
env:
ELEMENTS_PATH: ${{ github.workspace }}/elements
DIB_RELEASE: ${{ steps.split.outputs._1 }}
DIB_KUBERNETES_VERSION: ${{ matrix.version }}
DIB_MIN_TMPFS: "4"
- uses: actions/upload-artifact@v4

- name: Publish artifact
uses: actions/upload-artifact@v4
with:
name: ${{ steps.split.outputs._0 }}-${{ steps.split.outputs._1 }}-${{ matrix.version }}
path: image.qcow2
name: ${{ env.IMAGE_NAME }}
path: ${{ env.IMAGE_NAME }}.qcow2
if-no-files-found: error
retention-days: 7

- name: Upload image to release
uses: softprops/action-gh-release@v1
if: github.ref_type == 'tag'
with:
files: ${{ env.IMAGE_NAME }}.qcow2