Skip to content

Try to optimize Test workflow #108

Try to optimize Test workflow

Try to optimize Test workflow #108

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:
build:
runs-on: ubuntu-24.04
strategy:
matrix:
ubuntu_version: ${{ fromJson(env.UBUNTU_VERSIONS) }}

Check failure on line 15 in .github/workflows/test.yaml

View workflow run for this annotation

GitHub Actions / Test

Invalid workflow file

The workflow is not valid. .github/workflows/test.yaml (Line: 15, Col: 25): Unrecognized named-value: 'env'. Located at position 10 within expression: fromJson(env.UBUNTU_VERSIONS) .github/workflows/test.yaml (Line: 15, Col: 25): Unexpected value '${{ fromJson(env.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: "${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