mirror of
https://github.com/kevinveenbirkenbach/computer-playbook.git
synced 2026-11-08 11:46:35 +00:00
Makes clear that multiple space- or comma-separated app ids are supported. Renames the env var, CLI flag (--app → --apps), and all references in scripts, workflows, and documentation. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
110 lines
2.9 KiB
YAML
110 lines
2.9 KiB
YAML
name: Test Infinito.Nexus 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:
|
|
TEST_DEPLOY_TYPE: "server"
|
|
DISTROS: "debian"
|
|
NIX_CONFIG: ""
|
|
INFINITO_IMAGE_TAG: "latest"
|
|
|
|
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: Start stack for discovery
|
|
shell: bash
|
|
run: |
|
|
set -euo pipefail
|
|
make up
|
|
|
|
- name: Discover apps
|
|
id: discover
|
|
shell: bash
|
|
env:
|
|
WHITELIST: ${{ inputs.whitelist }}
|
|
run: |
|
|
set -euo pipefail
|
|
apps="$(./scripts/meta/resolve/apps.sh)"
|
|
[[ -n "$apps" ]] || apps='[]'
|
|
echo "apps=$apps" >> "$GITHUB_OUTPUT"
|
|
echo "apps_json=$apps" >> "$GITHUB_OUTPUT"
|
|
echo "apps_json=$apps"
|
|
|
|
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:
|
|
- uses: actions/checkout@v6
|
|
|
|
- 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:
|
|
TEST_DEPLOY_TYPE: ${{ needs.discover.outputs.test_deploy_type }}
|
|
DISTROS: ${{ needs.discover.outputs.distros }}
|
|
APPS: ${{ matrix.apps }}
|
|
run: ./scripts/tests/deploy/ci/all.sh
|