Merge remote-tracking branch 'upstream/main' into feature/self-host-runners

# Conflicts:
#	.github/workflows/test-deploy-universal.yml
#	.github/workflows/test-deploy-workstation.yml
This commit is contained in:
Alejandro Roman committed 2026-06-27 23:45:38 +02:00
commit 17d6ac904f
597 files changed
+19255 -5920

No files matched your search

+16 -6
View File
@@ -27,6 +27,11 @@ on:
required: false
type: string
default: "false"
trusted_pr:
description: "True when the PR carries the maintainer trusted-pr label; skips the fork-prereq wait."
required: false
type: boolean
default: false
concurrency:
group: infinito-test-${{ github.ref }}
@@ -42,23 +47,25 @@ jobs:
wait-fork-prereq-run:
name: ⏳ Wait for fork run
runs-on: ubuntu-latest
env:
WAIT_REQUIRED: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name != github.repository && !inputs.trusted_pr }}
steps:
- name: Mark fork prerequisites as ready outside fork PRs
if: ${{ github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository }}
- name: Mark fork prerequisites as ready outside fork PRs or for trusted PRs
if: ${{ env.WAIT_REQUIRED != 'true' }}
shell: bash
run: |
set -euo pipefail
echo "Fork prerequisites are implicitly ready outside fork pull_request events."
echo "Fork prerequisites are implicitly ready (non-fork PR or trusted-pr label)."
- name: Checkout trusted workflow repo (helpers)
if: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name != github.repository }}
if: ${{ env.WAIT_REQUIRED == 'true' }}
uses: actions/checkout@v7
with:
ref: ${{ github.event.pull_request.base.sha }}
persist-credentials: false
- name: Login to GHCR for CI image checks
if: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name != github.repository }}
if: ${{ env.WAIT_REQUIRED == 'true' }}
uses: docker/login-action@4907a6ddec9925e35a0a9e82d7399ccc52663121 # v4.1.0
with:
registry: ghcr.io
@@ -66,7 +73,7 @@ jobs:
password: ${{ secrets.GITHUB_TOKEN }}
- name: Wait for privileged fork CI images
if: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name != github.repository }}
if: ${{ env.WAIT_REQUIRED == 'true' }}
shell: bash
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
@@ -115,6 +122,8 @@ jobs:
uses: ./.github/workflows/lint-markdown.yml
lint-makefile:
uses: ./.github/workflows/lint-makefile.yml
lint-packages:
uses: ./.github/workflows/lint-packages.yml
lint-javascript:
uses: ./.github/workflows/lint-javascript.yml
lint-playwright:
@@ -128,6 +137,7 @@ jobs:
- lint-shell
- lint-markdown
- lint-makefile
- lint-packages
- lint-javascript
- lint-playwright
runs-on: ubuntu-latest
+89
View File
@@ -0,0 +1,89 @@
name: "🧹 Cleanup: Stale Repository Data"
on:
schedule:
- cron: "0 0 * * *"
workflow_dispatch:
permissions:
contents: write
issues: write
pull-requests: write
packages: write
jobs:
stale:
name: 🏷️ Close inactive issues and pull requests
runs-on: ubuntu-latest
steps:
- name: 🏷️ Mark stale issues and pull requests
uses: actions/stale@v9
with:
# Issues
days-before-issue-stale: 90
days-before-issue-close: 7
stale-issue-label: "stale"
stale-issue-message: >
This issue has been marked as stale because it has had no activity
for the last 90 days. It will be automatically closed in 7 days
unless there is further activity.
close-issue-message: >
This issue has been automatically closed due to inactivity.
# Pull Requests
days-before-pr-stale: 180
days-before-pr-close: 30
stale-pr-label: "stale"
stale-pr-message: >
This pull request has been marked as stale because it has had no
activity for the last 180 days. It will be automatically closed in
30 days unless there is further activity.
close-pr-message: >
This pull request has been automatically closed due to inactivity.
remove-stale-when-updated: true
delete-stale-branches:
name: 🌿 Delete inactive branches
runs-on: ubuntu-latest
steps:
- name: 🌿 Delete branches inactive for 360 days
uses: crs-k/stale-branches@v8
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
days-before-stale: 360
days-before-delete: 0
protected-branches: |
main
master
develop
dev
release/**
hotfix/**
compare-branches: info
dry-run: false
cleanup-ghcr-ci-images:
name: 📦 Delete old GHCR CI images
runs-on: ubuntu-latest
steps:
- name: 📥 Checkout
uses: actions/checkout@v7
- name: 📦 Install project environment
run: make install
- name: 📦 Delete ci-* images older than 60 days
shell: bash
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
ORG: infinito-nexus
PACKAGE_PREFIX: core
MAX_AGE_DAYS: 60
TAG_PREFIX: ci-
run: bash scripts/github/cleanup/ghcr_ci_images.sh
@@ -9,12 +9,14 @@ on:
- synchronize
- reopened
- ready_for_review
- labeled
pull_request_target:
types:
- opened
- synchronize
- reopened
- ready_for_review
- labeled
concurrency:
# Keep only the newest run per PR and event type.
@@ -128,6 +130,7 @@ jobs:
distros: "arch debian ubuntu fedora centos"
whitelist: ${{ needs.detect-affected-roles.outputs.whitelist }}
roles_only: ${{ needs.detect-affected-roles.outputs.roles_only }}
trusted_pr: ${{ contains(github.event.pull_request.labels.*.name, 'trusted-pr') }}
prepare-fork-merge-ref:
needs:
@@ -138,6 +141,7 @@ jobs:
outputs:
checkout_ref: ${{ steps.out.outputs.checkout_ref }}
image_tag: ${{ steps.out.outputs.image_tag }}
trusted: ${{ contains(github.event.pull_request.labels.*.name, 'trusted-pr') }}
steps:
- name: Checkout
uses: actions/checkout@v7
@@ -154,7 +158,8 @@ jobs:
uses: ./.github/workflows/images-build-ci.yml
with:
distros: "arch debian ubuntu fedora centos"
checkout_ref: ${{ needs.prepare-fork-merge-ref.outputs.checkout_ref }}
checkout_ref: ${{ needs.prepare-fork-merge-ref.outputs.trusted == 'true' && github.event.pull_request.head.sha || needs.prepare-fork-merge-ref.outputs.checkout_ref }}
source_repository: ${{ needs.prepare-fork-merge-ref.outputs.trusted == 'true' && github.event.pull_request.head.repo.full_name || github.repository }}
image_tag: ${{ needs.prepare-fork-merge-ref.outputs.image_tag }}
concurrency_channel: pr-target-build-producer
secrets: inherit
+18
View File
@@ -22,11 +22,29 @@ permissions:
security-events: write
jobs:
sync-main:
name: 🔄 Sync main
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v7
with:
fetch-depth: 0
- name: Sync main from source repository
shell: bash
env:
CI_SYNC_MAIN_SOURCE_REPOSITORY_DEFAULT: infinito-nexus/core
CI_SYNC_MAIN_SOURCE_REPOSITORY: ${{ vars.CI_SYNC_MAIN_SOURCE_REPOSITORY }}
CI_SYNC_MAIN_SOURCE_REPOSITORY_IS_SET: ${{ contains(toJSON(vars), '"CI_SYNC_MAIN_SOURCE_REPOSITORY"') }}
run: ./scripts/github/sync/main_from_repository.sh
# Skip CI when the push is to main and CI_RUN_ON_MAIN is not 'true', or
# when the push is a branch creation whose commit is already in origin/main.
# All other pushes run CI.
run-policy:
name: 🧭 Decide CI policy
needs: sync-main
runs-on: ubuntu-latest
outputs:
should_run: ${{ steps.decide.outputs.should_run }}
+6 -1
View File
@@ -12,6 +12,11 @@ on:
required: false
type: string
default: ""
source_repository:
description: "Repository to checkout as the build source (default: github.repository). Set to a fork only for maintainer-trusted PRs."
required: false
type: string
default: ""
image_tag:
description: "Optional image tag override (default: ci-${github.sha})"
required: false
@@ -68,7 +73,7 @@ jobs:
- name: Checkout source to build
uses: actions/checkout@v7
with:
repository: ${{ github.repository }}
repository: ${{ inputs.source_repository || github.repository }}
ref: ${{ inputs.checkout_ref || github.ref }}
path: _src
persist-credentials: false
+2 -1
View File
@@ -34,10 +34,11 @@ jobs:
shell: bash
run: |
set -euo pipefail
source scripts/meta/env/load.sh
{
echo "owner=$(scripts/meta/resolve/repository/owner.sh)"
echo "repo_prefix=$(scripts/meta/resolve/repository/name.sh)"
echo "distros=$(scripts/meta/resolve/distros.sh)"
echo "distros=${INFINITO_DISTROS}"
} >> "$GITHUB_OUTPUT"
- name: 📦 Install jq
+25
View File
@@ -0,0 +1,25 @@
name: "🔍 Lint: Packages"
on:
workflow_call:
permissions:
contents: read
jobs:
lint-packages:
name: 🧹 Lint Packages
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
- name: Checkout repository
uses: actions/checkout@v7
- name: Install packaging validators
run: |
sudo apt-get update
sudo apt-get install -y --no-install-recommends dpkg-dev rpm
- name: Validate distro packaging metadata
run: bash scripts/lint/packages.sh
+2 -2
View File
@@ -34,13 +34,13 @@ jobs:
shell: bash
run: |
set -euo pipefail
source scripts/meta/env/load.sh
owner="$(scripts/meta/resolve/repository/owner.sh)"
repo_prefix="$(scripts/meta/resolve/repository/name.sh)"
distros="$(scripts/meta/resolve/distros.sh)"
{
echo "owner=${owner}"
echo "repo_prefix=${repo_prefix}"
echo "distros=${distros}"
echo "distros=${INFINITO_DISTROS}"
} >> "$GITHUB_OUTPUT"
- name: Login to GHCR (for manifest checks)
+3 -2
View File
@@ -82,7 +82,7 @@ jobs:
run: ./scripts/github/resolve/output_apps.sh
deploy:
name: 🚀 Deploy ${{ needs.discover.outputs.test_deploy_type }} app (${{ matrix.apps }})
name: 🚀 Deploy ${{ needs.discover.outputs.test_deploy_type }} app (${{ matrix.apps }}${{ matrix.variant && format(' [{0}]', matrix.variant) || '' }})
if: needs.discover.outputs.apps != '' && needs.discover.outputs.apps != '[]'
runs-on: ubuntu-latest
timeout-minutes: 360
@@ -92,7 +92,7 @@ jobs:
fail-fast: false
max-parallel: 1 # immer linear
matrix:
apps: ${{ fromJson(needs.discover.outputs.apps) }}
include: ${{ fromJson(needs.discover.outputs.apps) }}
steps:
# Reclaim runner space before Docker pulls start. Deploy jobs otherwise
@@ -128,6 +128,7 @@ jobs:
INFINITO_DEPLOY_TYPE: ${{ needs.discover.outputs.test_deploy_type }}
INFINITO_DISTROS: ${{ needs.discover.outputs.distros }}
apps: ${{ matrix.apps }}
variant: ${{ matrix.variant }}
ANSIBLE_LOG_PATH: /tmp/ansible-${{ matrix.apps }}.log
run: ./scripts/tests/deploy/ci/all.sh
+4 -3
View File
@@ -75,7 +75,7 @@ jobs:
run: ./scripts/github/resolve/output_apps.sh
server:
name: 🌐 Deploy ${{ matrix.apps }}
name: 🌐 Deploy ${{ matrix.apps }}${{ matrix.variant && format(' [{0}]', matrix.variant) || '' }}
if: needs.discover.outputs.apps != '' && needs.discover.outputs.apps != '[]'
runs-on: ubuntu-latest
timeout-minutes: 360
@@ -84,7 +84,7 @@ jobs:
strategy:
fail-fast: false
matrix:
apps: ${{ fromJson(needs.discover.outputs.apps) }}
include: ${{ fromJson(needs.discover.outputs.apps) }}
steps:
# Reclaim runner space before Docker pulls start. Server deploy tests pull
@@ -125,6 +125,7 @@ jobs:
shell: bash
env:
apps: ${{ matrix.apps }}
variant: ${{ matrix.variant }}
ANSIBLE_LOG_PATH: /tmp/ansible-${{ matrix.apps }}.log
run: ./scripts/tests/deploy/ci/all.sh
@@ -152,6 +153,6 @@ jobs:
if: always()
uses: actions/upload-artifact@v7
with:
name: playwright-server-${{ matrix.apps }}
name: playwright-server-${{ matrix.apps }}${{ matrix.variant_slug && format('-{0}', matrix.variant_slug) || '' }}
path: /tmp/playwright-artifacts/
if-no-files-found: ignore
+6 -4
View File
@@ -85,7 +85,7 @@ jobs:
run: bash scripts/github/split_runner_apps.sh
universal:
name: ✨ Deploy ${{ matrix.apps }}
name: ✨ Deploy ${{ matrix.apps }}${{ matrix.variant && format(' [{0}]', matrix.variant) || '' }}
if: needs.discover.outputs.apps_github != '' && needs.discover.outputs.apps_github != '[]'
runs-on: ubuntu-latest
timeout-minutes: 360
@@ -94,7 +94,7 @@ jobs:
strategy:
fail-fast: false
matrix:
apps: ${{ fromJson(needs.discover.outputs.apps_github) }}
include: ${{ fromJson(needs.discover.outputs.apps_github) }}
steps:
# Reclaim runner space before Docker pulls start. Deploy jobs otherwise
@@ -134,6 +134,7 @@ jobs:
shell: bash
env:
apps: ${{ matrix.apps }}
variant: ${{ matrix.variant }}
ANSIBLE_LOG_PATH: /tmp/ansible-${{ matrix.apps }}.log
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: ./scripts/tests/deploy/ci/all.sh
@@ -149,7 +150,7 @@ jobs:
run: ./scripts/github/runner/dump_state.sh "post-deploy failure (${{ matrix.apps }})"
universal-self-hosted:
name: ✨ Deploy ${{ matrix.apps }} (self-hosted)
name: ✨ Deploy ${{ matrix.apps }}${{ matrix.variant && format(' [{0}]', matrix.variant) || '' }} (self-hosted)
if: needs.discover.outputs.apps_self_hosted != '' && needs.discover.outputs.apps_self_hosted != '[]'
runs-on: [self-hosted, linux]
timeout-minutes: 360
@@ -158,7 +159,7 @@ jobs:
strategy:
fail-fast: false
matrix:
apps: ${{ fromJson(needs.discover.outputs.apps_self_hosted) }}
include: ${{ fromJson(needs.discover.outputs.apps_self_hosted) }}
steps:
- name: Fix workspace ownership
@@ -177,6 +178,7 @@ jobs:
shell: bash
env:
apps: ${{ matrix.apps }}
variant: ${{ matrix.variant }}
INFINITO_TIMEOUT_MULTIPLIER: ${{ vars.INFINITO_TIMEOUT_MULTIPLIER || '1' }}
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: ./scripts/tests/deploy/ci/all.sh
@@ -84,7 +84,7 @@ jobs:
run: bash scripts/github/split_runner_apps.sh
workstation:
name: 🖥️ Deploy ${{ matrix.apps }}
name: 🖥️ Deploy ${{ matrix.apps }}${{ matrix.variant && format(' [{0}]', matrix.variant) || '' }}
if: needs.discover.outputs.apps_github != '' && needs.discover.outputs.apps_github != '[]'
runs-on: ubuntu-latest
timeout-minutes: 360
@@ -93,7 +93,7 @@ jobs:
strategy:
fail-fast: false
matrix:
apps: ${{ fromJson(needs.discover.outputs.apps_github) }}
include: ${{ fromJson(needs.discover.outputs.apps_github) }}
steps:
# Reclaim runner space before Docker pulls start. Deploy jobs otherwise
@@ -133,6 +133,7 @@ jobs:
shell: bash
env:
apps: ${{ matrix.apps }}
variant: ${{ matrix.variant }}
ANSIBLE_LOG_PATH: /tmp/ansible-${{ matrix.apps }}.log
run: ./scripts/tests/deploy/ci/all.sh
@@ -147,7 +148,7 @@ jobs:
run: ./scripts/github/runner/dump_state.sh "post-deploy failure (${{ matrix.apps }})"
workstation-self-hosted:
name: 🖥️ Deploy ${{ matrix.apps }} (self-hosted)
name: 🖥️ Deploy ${{ matrix.apps }}${{ matrix.variant && format(' [{0}]', matrix.variant) || '' }} (self-hosted)
if: needs.discover.outputs.apps_self_hosted != '' && needs.discover.outputs.apps_self_hosted != '[]'
runs-on: [self-hosted, linux]
timeout-minutes: 360
@@ -156,7 +157,7 @@ jobs:
strategy:
fail-fast: false
matrix:
apps: ${{ fromJson(needs.discover.outputs.apps_self_hosted) }}
include: ${{ fromJson(needs.discover.outputs.apps_self_hosted) }}
steps:
- name: Fix workspace ownership
@@ -175,6 +176,7 @@ jobs:
shell: bash
env:
apps: ${{ matrix.apps }}
variant: ${{ matrix.variant }}
INFINITO_TIMEOUT_MULTIPLIER: ${{ vars.INFINITO_TIMEOUT_MULTIPLIER || '1' }}
run: ./scripts/tests/deploy/ci/all.sh