Files
computer-playbook/.github/workflows/test-deploy-server.yml
T
kevinveenbirkenbach 734f013179 ci: wire GHCR mirror envs into deploy workflows and inventory init
- Add required GHCR mirror environment variables to CI workflows
- Generate mirrors.yml during development inventory init on CI
- Introduce mirrors helper module with strict env validation
- Minor formatting cleanup in mirror providers
`

https://chatgpt.com/share/6980ff2e-8f18-800f-85e1-79d56a2027f5
2026-02-02 20:46:41 +01:00

111 lines
2.5 KiB
YAML

name: Test Infinito.Nexus Deploy (server)
on:
workflow_call:
inputs:
distros:
description: "Space-separated distro list"
required: true
type: string
permissions:
contents: read
packages: read
env:
TEST_DEPLOY_TYPE: server
DISTROS: ${{ inputs.distros }}
ONLY_APP: ""
NIX_CONFIG: |
access-tokens = github.com=${{ secrets.GITHUB_TOKEN }}
INFINITO_IMAGE_TAG: ci-${{ github.sha }}
# required for mirrors generation inside container (no fallbacks)
GITHUB_REPOSITORY_OWNER: ${{ github.repository_owner }}
INFINITO_GHCR_MIRROR_PREFIX: mirror
jobs:
discover:
name: discover apps (arch)
runs-on: ubuntu-latest
timeout-minutes: 60
outputs:
apps: ${{ steps.discover.outputs.apps }}
steps:
- uses: actions/checkout@v6
- name: Install jq
shell: bash
run: |
set -euo pipefail
sudo apt-get update
sudo apt-get install -y jq
- name: Install deps (jq + envsubst)
shell: bash
run: |
set -euo pipefail
sudo apt-get update
sudo apt-get install -y jq gettext-base
- name: Start stack for discovery (arch)
shell: bash
run: |
set -euo pipefail
make docker-up
- name: Discover apps
id: discover
run: |
make ci-discover-output
server:
name: deploy:server (${{ matrix.app }})
runs-on: ubuntu-latest
timeout-minutes: 240
needs: discover
strategy:
fail-fast: false
matrix:
app: ${{ fromJson(needs.discover.outputs.apps) }}
steps:
- uses: actions/checkout@v6
- name: Install jq
shell: bash
run: |
set -euo pipefail
sudo apt-get update
sudo apt-get install -y jq
- name: Start stack (arch)
shell: bash
run: |
set -euo pipefail
make docker-up
- name: Deploy app
shell: bash
run: |
set -euo pipefail
export TEST_DEPLOY_TYPE="server"
export APP="${{ matrix.app }}"
make ci-deploy-app
- name: Show last 200 log lines on failure
if: failure()
shell: bash
run: |
scripts/meta/log-tail.sh logs 200
- name: Upload deploy logs
if: ${{ always() && env.ACT != 'true' }}
uses: actions/upload-artifact@v6
with:
name: deploy-logs-server-${{ matrix.app }}
path: logs/
if-no-files-found: warn
retention-days: 14