Skip to content

Manual workflow (matrix) #6

Manual workflow (matrix)

Manual workflow (matrix) #6

Workflow file for this run

name: Manual workflow (matrix)
on:
workflow_dispatch:
inputs:
name:
description: 'Person to greet'
default: 'World'
required: true
jobs:
greet:
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
id: display
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 "os-info=$OS_INFO" >> "$GITHUB_OUTPUT"
echo "release-info=$RELEASE_INFO" >> "$GITHUB_OUTPUT"
echo "version-info=$VERSION_INFO" >> "$GITHUB_OUTPUT"
echo "machine-info=$MACHINE_INFO" >> "$GITHUB_OUTPUT"
echo "processor-info=$PROCESSOR_INFO" >> "$GITHUB_OUTPUT"
- name: Summary
uses: actions/github-script@v6
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
script: |
import * as core from '@actions/core'
await core.summary
.addHeading('OS Information')
.addCodeBlock(generateTestResults(), "js")
.addTable([
[{data: 'Runner', header: true}, {data: 'OS', header: true}, {data: 'Release', header: true}, {data: 'Version', header: true}, {data: 'Machine', header: true}, {data: 'Processor', header: true}],
['${{ matrix.os }}', '${{ steps.display.outputs.os-info }}', '${{ steps.display.outputs.release-info }}', ${{ steps.display.outputs.version-info }}, ${{ steps.display.outputs.machine-info }}, ${{ steps.display.outputs.processor-info }}]
])
.write()