Skip to content

Nigthly

Nigthly #649

Workflow file for this run

name: Nigthly
on:
schedule:
- cron: '0 0 * * *'
workflow_dispatch:
jobs:
ubuntu-and-macos:
strategy:
matrix:
os: [ubuntu-latest, macos-latest]
runs-on: ${{ matrix.os }}
steps:
- uses: kenchan0130/actions-system-info@master
id: system-info
- name: Check outputs
run: |
OUTPUTS=(
"CPU Core: ${{ steps.system-info.outputs.cpu-core }}"
"CPU Model: ${{ steps.system-info.outputs.cpu-model }}"
"Hostname: ${{ steps.system-info.outputs.hostname }}"
"Kernel release: ${{ steps.system-info.outputs.kernel-release }}"
"Kernel version: ${{ steps.system-info.outputs.kernel-version }}"
"Name: ${{ steps.system-info.outputs.name }}"
"Platform: ${{ steps.system-info.outputs.platform }}"
"Release: ${{ steps.system-info.outputs.release }}"
"Total memory bytes: ${{ steps.system-info.outputs.totalmem }}"
)
IS_EMPTY_OUTOUT=false
for OUTPUT in "${OUTPUTS[@]}";do
echo "${OUTPUT}"
OUT=$(echo ${OUTPUT} | cut -d ':' -f2- | xargs)
if [[ -z "${OUT}" ]];then
IS_EMPTY_OUTOUT=true
fi
done
if "$IS_EMPTY_OUTOUT";then
exit 1
fi
windows:
runs-on: windows-latest
steps:
- uses: kenchan0130/actions-system-info@master
id: system-info
- name: Check outputs
run: |
$OUTPUTS = @(
"CPU Core: ${{ steps.system-info.outputs.cpu-core }}",
"CPU Model: ${{ steps.system-info.outputs.cpu-model }}",
"Hostname: ${{ steps.system-info.outputs.hostname }}",
"Kernel release: ${{ steps.system-info.outputs.kernel-release }}",
"Kernel version: ${{ steps.system-info.outputs.kernel-version }}",
"Name: ${{ steps.system-info.outputs.name }}",
"Platform: ${{ steps.system-info.outputs.platform }}",
"Release: ${{ steps.system-info.outputs.release }}",
"Total memory bytes: ${{ steps.system-info.outputs.totalmem }}"
)
$IS_EMPTY_OUTOUT = $FALSE
foreach($OUTPUT in $OUTPUTS){
Write-Host $OUTPUT
$_, $OUT = $OUTPUT.Split(":")
if ( [string]::IsNullOrEmpty(($OUT -join "").Trim()) ) {
$IS_EMPTY_OUTOUT = $TRUE
}
}
if ($IS_EMPTY_OUTOUT) {
exit 1
}