Skip to content

Manual workflow (matrix) #9

Manual workflow (matrix)

Manual workflow (matrix) #9

Workflow file for this run

name: Manual workflow (matrix)
on:
workflow_dispatch:
inputs:
name:
description: 'Person to greet'
default: 'World'
required: true
jobs:
runner-info:
strategy:
matrix:
os: [ ubuntu-latest, ubuntu-24.04, ubuntu-22.04, ubuntu-20.04, windows-latest, windows-2022, windows-2019, macos-latest, macos-11, macos-12, macos-13, macos-14 ]
# os: [ ubuntu-latest, ubuntu-24.04, ubuntu-22.04, ubuntu-20.04, windows-latest, windows-2022, windows-2019, macos-latest, macos-latest-large, macos-latest-xlarge, macos-11, macos-12, macos-12-large, macos-13, macos-13-large, macos-13-xlarge, macos-14, macos-14-large, macos-14-xlarge ]
runs-on: ${{ matrix.os }}
steps:
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: 3.x
- name: Display OS info (Windows)
if: startWith(matrix.os, 'windows') == true

Check failure on line 25 in .github/workflows/manual-matrix.yml

View workflow run for this annotation

GitHub Actions / Manual workflow (matrix)

Invalid workflow file

The workflow is not valid. .github/workflows/manual-matrix.yml (Line: 25, Col: 13): Unrecognized function: 'startWith'. Located at position 1 within expression: startWith(matrix.os, 'windows') == true .github/workflows/manual-matrix.yml (Line: 37, Col: 13): Unrecognized function: 'startWith'. Located at position 1 within expression: startWith(matrix.os, 'windows') == false
run: |
$OS_INFO = python -c "import platform; print(f'OS: {platform.system()}')"
$RELEASE_INFO = python -c "import platform; print(f'Release: {platform.release()}')"
$VERSION_INFO = python -c "import platform; print(f'Version: {platform.version()}')"
$MACHINE_INFO = python -c "import platform; print(f'Machine: {platform.machine()}')"
$PROCESSOR_INFO = python -c "import platform; print(f'Processor: {platform.processor()}')"
echo "| Runner | OS | Release | Version | Machine | Processor |" >> $env:GITHUB_STEP_SUMMARY
echo "| --- | --- | --- | --- | --- | --- |" >> $env:GITHUB_STEP_SUMMARY
echo "| $OS_INFO | $RELEASE_INFO | $VERSION_INFO | $MACHINE_INFO | $PROCESSOR_INFO |" >> $env:GITHUB_STEP_SUMMARY
- name: Display OS info (macOS, Linux)
if: startWith(matrix.os, 'windows') == false
run: |
OS_INFO=$(python -c "import platform; print(f'OS: {platform.system()}')")
RELEASE_INFO=$(python -c "import platform; print(f'Release: {platform.release()}')")
VERSION_INFO=$(python -c "import platform; print(f'Version: {platform.version()}')")
MACHINE_INFO=$(python -c "import platform; print(f'Machine: {platform.machine()}')")
PROCESSOR_INFO=$(python -c "import platform; print(f'Processor: {platform.processor()}')")
echo "| Runner | OS | Release | Version | Machine | Processor |" >> $GITHUB_STEP_SUMMARY
echo "| --- | --- | --- | --- | --- | --- |" >> $GITHUB_STEP_SUMMARY
echo "| $OS_INFO | $RELEASE_INFO | $VERSION_INFO | $MACHINE_INFO | $PROCESSOR_INFO |" >> $GITHUB_STEP_SUMMARY