mirror of
https://github.com/LGUG2Z/komorebi.git
synced 2026-11-14 21:04:04 +01:00
komorebi-for-kde/README.md, CONTRIBUTING.md -> docs/linux/ komorebi-for-mac/README.md, CONTRIBUTING.md -> docs/macos/ komorebi-for-kde/.github/* -> docs/dev/old-ci/linux/ komorebi-for-mac/.github/*, mkdocs.yml, check_schema_docs.py, dependencies.json, formula.template.rb -> docs/dev/old-ci/macos/ The CI workflows, dependabot files, issue templates, the macOS Homebrew formula template and docs-site configuration of the two old repositories are kept for the CI and release plan that follows (one workflow set, one release); under docs/ GitHub ignores them, as it did under the subdirectories, so no KDE or macOS workflow runs on this branch. Renames only (19 files); the Windows .github and files at the root are untouched.
38 lines
1.6 KiB
YAML
38 lines
1.6 KiB
YAML
# A hosted runner of a private repository may land on a host with no KVM, which fails the "Enable
|
|
# KVM" step of .github/actions/nix. Another attempt usually gets another host, so a run that failed
|
|
# only for that is rerun, up to three attempts. A suite that fails is left alone. A run cannot rerun
|
|
# its own failed jobs while it is still in progress, hence a workflow of its own.
|
|
|
|
name: rerun-no-kvm
|
|
|
|
on:
|
|
workflow_run:
|
|
workflows: [ci]
|
|
types: [completed]
|
|
|
|
jobs:
|
|
rerun:
|
|
if: >-
|
|
github.repository == 'LGUG2Z/komorebi-for-kde' &&
|
|
github.event.workflow_run.conclusion == 'failure' &&
|
|
github.event.workflow_run.run_attempt < 3
|
|
runs-on: ubuntu-24.04
|
|
permissions:
|
|
actions: write
|
|
steps:
|
|
- name: Rerun the failed jobs when every one of them failed to get KVM
|
|
env:
|
|
GH_TOKEN: ${{ github.token }}
|
|
RUN_ID: ${{ github.event.workflow_run.id }}
|
|
REPO: ${{ github.repository }}
|
|
run: |
|
|
# for each failed job, the name of the step that failed
|
|
failed=$(gh api --paginate "repos/$REPO/actions/runs/$RUN_ID/jobs?filter=latest" \
|
|
--jq '.jobs[] | select(.conclusion == "failure") | [.name, ([.steps[] | select(.conclusion == "failure") | .name] | first // "")] | @tsv')
|
|
echo "$failed"
|
|
if [ -z "$failed" ] || printf '%s\n' "$failed" | awk -F'\t' '$2 !~ /Enable KVM/ { bad = 1 } END { exit !bad }'; then
|
|
echo "something other than a missing /dev/kvm failed: not rerunning"
|
|
exit 0
|
|
fi
|
|
gh run rerun "$RUN_ID" --repo "$REPO" --failed
|