Try to optimize Test workflow #108
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | ||
name: Test | ||
'on': push | ||
env: | ||
DOCKER_IMAGE: "cristiklein/stateless-workstation-config/ubuntu-desktop" | ||
UBUNTU_VERSIONS: '["24.04", "24.10"]' | ||
jobs: | ||
build: | ||
runs-on: ubuntu-24.04 | ||
strategy: | ||
matrix: | ||
ubuntu_version: ${{ fromJson(env.UBUNTU_VERSIONS) }} | ||
Check failure on line 15 in .github/workflows/test.yaml GitHub Actions / TestInvalid workflow file
|
||
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: "${DOCKER_IMAGE}:${UBUNTU_VERSION}" | ||
cache-from: type=gha | ||
cache-to: type=gha,mode=max | ||
outputs: type=docker,dest=/tmp/ubuntu-desktop-${UBUNTU_VERSION}.tar | ||
- name: Upload artifact | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: "${DOCKER_IMAGE}:${UBUNTU_VERSION}" | ||
path: /tmp/ubuntu-desktop-${UBUNTU_VERSION}.tar | ||
test: | ||
runs-on: ubuntu-24.04 | ||
strategy: | ||
matrix: | ||
role: | ||
- '' | ||
- cklein.cloud_tools | ||
- cklein.cncf | ||
- cklein.git | ||
- cklein.go | ||
- cklein.security | ||
- cklein.shell | ||
ubuntu_version: $${ fromJson(env.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 |