Build containers / Compute changes (push) Successful in 3s
Build containers / fedora-cosmic (rawhide) (push) Failing after 1m10s
Build containers / fedora-remote (44) (push) Failing after 1m14s
Build containers / fedora-cosmic (44) (push) Successful in 13m5s
Build containers / Prune old releases and tags (push) Failing after 28s
Gitea does not expand a dynamic fromJson matrix (the job name stayed literal and it queued with no matching runner). Instead, compute cosmic/remote booleans in a changes job and gate static-matrix build jobs with job-level if.
25 lines
786 B
Bash
Executable File
25 lines
786 B
Bash
Executable File
#!/usr/bin/env bash
|
|
# Given changed paths on stdin, print `cosmic=<bool>` and `remote=<bool>` so the
|
|
# workflow can skip images that didn't change. Shared files or build tooling
|
|
# changes rebuild everything; empty input (schedule/manual) rebuilds everything.
|
|
set -euo pipefail
|
|
|
|
changed="$(cat || true)"
|
|
|
|
all=0
|
|
[[ -z "${changed}" ]] && all=1
|
|
grep -qE '^(build\.sh|release\.sh|prune-releases\.sh|prune-registry\.sh|ci-changes\.sh|\.gitea/)' <<< "${changed}" && all=1
|
|
grep -qE '^images/shared/' <<< "${changed}" && all=1
|
|
|
|
cosmic=false
|
|
remote=false
|
|
if [[ "${all}" == 1 ]]; then
|
|
cosmic=true
|
|
remote=true
|
|
fi
|
|
grep -qE '^images/fedora-cosmic/' <<< "${changed}" && cosmic=true
|
|
grep -qE '^images/fedora-remote/' <<< "${changed}" && remote=true
|
|
|
|
echo "cosmic=${cosmic}"
|
|
echo "remote=${remote}"
|