Skip to content

Fix CI

Fix CI #113

Workflow file for this run

---
name: Test
'on': push
env:
DOCKER_IMAGE: "cristiklein/stateless-workstation-config/ubuntu-desktop"
UBUNTU_VERSIONS: '["24.04", "24.10"]'
jobs:
prepare-matrix:
name: Prepare the matrix, so we don't need to repeat ourselves
runs-on: ubuntu-latest
outputs:
UBUNTU_VERSIONS: ${{ steps.step1.outputs.UBUNTU_VERSIONS }}
steps:
- name: Create UBUNTU_VERSIONS variable
id: step1
run: echo "UBUNTU_VERSIONS=${{env.UBUNTU_VERSIONS}}" >> $GITHUB_OUTPUT
build:
name: Build images which emulate a freshly installed Ubuntu Desktop
runs-on: ubuntu-latest
needs:
- prepare-matrix
strategy:
matrix:
ubuntu_version: "${{ fromJson(needs.prepare-matrix.outputs.UBUNTU_VERSIONS) }}"
steps:
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Build and export
uses: docker/build-push-action@v6
with:
context: .
tags: "${{ env.DOCKER_IMAGE }}:${{ matrix.UBUNTU_VERSION }}"
cache-from: type=gha
cache-to: type=gha,mode=max
outputs: type=docker,dest=/tmp/ubuntu-desktop-${{ matrix.UBUNTU_VERSION }}.tar
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: "${{ env.DOCKER_IMAGE }}:${{ matrix.UBUNTU_VERSION }}"
path: /tmp/ubuntu-desktop-${{ matrix.UBUNTU_VERSION }}.tar
test:
runs-on: ubuntu-latest
needs:
- prepare-matrix
- build
strategy:
matrix:
role:
- ''
- cklein.cloud_tools
- cklein.cncf
- cklein.git
- cklein.go
- cklein.security
- cklein.shell
ubuntu_version: "${{ fromJson(needs.prepare-matrix.outputs.UBUNTU_VERSIONS) }}"
env:
ROLE: ${{ matrix.ROLE }}
UBUNTU_VERSION: ${{ matrix.UBUNTU_VERSION }}
steps:
- uses: actions/checkout@v4
- name: Generate Site YAML for Role
run: |
./scripts/generate-site-yml-for-role.sh
cat site.yml
- name: Test Role
run: ./test.sh