Files
computer-playbook/.github/workflows/test-deploy-server.yml
T
kevinveenbirkenbach 3a7508fbf1 ci: rename make up/down targets to docker-up/docker-down in workflows and Makefile
Replaced all usages of `make up` with `make docker-up` in GitHub Actions workflows.
Renamed Makefile targets:
- up      -> docker-up
- down    -> docker-down
- stop    -> docker-stop
- added docker-restart

This makes the Docker-specific intent explicit and avoids ambiguity with other potential `up` targets.

https://chatgpt.com/share/696bb966-ee90-800f-a5d2-e419cc423cc4
2026-01-17 17:31:25 +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 }}
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: Start stack for discovery (arch)
shell: bash
run: |
set -euo pipefail
make docker-up
- name: Discover apps (JSON)
id: discover
shell: bash
run: |
set -euo pipefail
apps="$(make ci-deploy-discover)"
[[ -n "${apps}" ]] || apps='[]'
if [[ -n "${ONLY_APP}" ]]; then
apps="$(jq -nc --arg a "${ONLY_APP}" '[ $a ]')"
fi
echo "apps=${apps}" >> "$GITHUB_OUTPUT"
echo "apps_json=${apps}"
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/ci/log-tail.sh logs 200
- name: Upload deploy logs
if: ${{ always() && env.ACT != 'true' }}
uses: actions/upload-artifact@v4
with:
name: deploy-logs-server-${{ matrix.app }}
path: logs/
if-no-files-found: warn
retention-days: 14