Files
computer-playbook/.github/workflows/test-deploy-local.yml
T
dependabot[bot] ff78da560c chore(deps): bump actions/setup-python from 5 to 6
Bumps [actions/setup-python](https://github.com/actions/setup-python) from 5 to 6.
- [Release notes](https://github.com/actions/setup-python/releases)
- [Commits](https://github.com/actions/setup-python/compare/v5...v6)

---
updated-dependencies:
- dependency-name: actions/setup-python
  dependency-version: '6'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-05-27 15:18:16 +00:00

141 lines
4.2 KiB
YAML

name: "📦 Test: Deploy (local)"
on:
workflow_dispatch:
inputs:
test_deploy_type:
description: "server | universal | workstation"
required: false
default: "server"
type: string
distros:
description: "Space-separated distro list"
required: false
default: "debian"
type: string
whitelist:
description: "Optional space-separated whitelist of app ids"
required: false
type: string
default: ""
permissions:
contents: read
packages: read
# IMPORTANT:
# - For local `act`, prefer overriding via `--env`.
# - For GitHub UI dispatch, inputs are used as fallback.
env:
INFINITO_DEPLOY_TYPE: "server"
INFINITO_DISTROS: "debian"
NIX_CONFIG: ""
INFINITO_IMAGE_TAG: "latest"
INFINITO_PLAYWRIGHT_KEEP: ${{ vars.INFINITO_PLAYWRIGHT_KEEP }}
INFINITO_APP_DISCOVERY_RUNNER: host
jobs:
discover:
name: 🔎 Discover apps (local)
runs-on: ubuntu-latest
timeout-minutes: 60
outputs:
apps: ${{ steps.discover.outputs.apps }}
test_deploy_type: ${{ steps.vars.outputs.test_deploy_type }}
distros: ${{ steps.vars.outputs.distros }}
whitelist: ${{ steps.vars.outputs.whitelist }}
steps:
- uses: actions/checkout@v6
- name: Resolve effective inputs/env
id: vars
shell: bash
env:
INPUT_TEST_DEPLOY_TYPE: ${{ inputs.test_deploy_type }}
INPUT_DISTROS: ${{ inputs.distros }}
INPUT_WHITELIST: ${{ inputs.whitelist }}
run: |
set -euo pipefail
scripts/meta/resolve/input.sh
- name: Install deps (jq + envsubst)
shell: bash
run: ./scripts/install/apt.sh jq gettext-base
- name: Set up Python
uses: actions/setup-python@v6
with:
python-version: "3.11"
- name: Install project (host venv)
shell: bash
run: make install
- name: Discover apps
id: discover
shell: bash
env:
INFINITO_WHITELIST: ${{ inputs.whitelist }}
run: ./scripts/github/resolve/output_apps.sh
deploy:
name: 🚀 Deploy ${{ needs.discover.outputs.test_deploy_type }} app (${{ matrix.apps }})
if: needs.discover.outputs.apps != '' && needs.discover.outputs.apps != '[]'
runs-on: ubuntu-latest
timeout-minutes: 360
needs: discover
strategy:
fail-fast: false
max-parallel: 1 # immer linear
matrix:
apps: ${{ fromJson(needs.discover.outputs.apps) }}
steps:
# Reclaim runner space before Docker pulls start. Deploy jobs otherwise
# compete with the default Ubuntu image payload for limited root space.
# Option rationale: docs/contributing/artefact/files/github/workflow.md
- name: 🧹 Free disk space
uses: jlumbroso/free-disk-space@54081f138730dfa15788a46383842cd2f914a1be # v1.3.1
with:
tool-cache: true
android: true
dotnet: true
haskell: true
large-packages: true
docker-images: true
swap-storage: true
- uses: actions/checkout@v6
# Replace the default ~4 GB runner swap with a larger file so transient
# memory spikes (e.g. peertube plugin install, issue #162) don't trip
# the host OOM-killer. Script picks / or /mnt based on live free space.
- name: 💾 Enlarge swap space
shell: bash
run: ./scripts/github/runner/enlarge_swap.sh
- name: Install deps (jq + envsubst)
shell: bash
run: ./scripts/install/apt.sh jq gettext-base
- name: 🚀 Deploy app (same as CI logic)
shell: bash
env:
INFINITO_DEPLOY_TYPE: ${{ needs.discover.outputs.test_deploy_type }}
INFINITO_DISTROS: ${{ needs.discover.outputs.distros }}
INFINITO_APPS: ${{ matrix.apps }}
ANSIBLE_LOG_PATH: /tmp/ansible-${{ matrix.apps }}.log
run: ./scripts/tests/deploy/ci/all.sh
- name: 📊 Role runtimes
if: always()
shell: bash
run: python3 utils/github/profile/role_summary.py /tmp/ansible-${{ matrix.apps }}.log
- name: 🩺 Dump runner state (on failure)
if: failure()
shell: bash
run: ./scripts/github/runner/dump_state.sh "post-deploy failure (${{ matrix.apps }})"