mirror of
https://github.com/kevinveenbirkenbach/computer-playbook.git
synced 2026-11-08 11:46:35 +00:00
101 lines
2.4 KiB
YAML
101 lines
2.4 KiB
YAML
name: Test Infinito.Nexus Deploy (server)
|
|
|
|
on:
|
|
workflow_call:
|
|
inputs:
|
|
distros:
|
|
description: "Space-separated distro list"
|
|
required: true
|
|
type: string
|
|
whitelist:
|
|
description: "Optional space-separated whitelist of app ids"
|
|
required: false
|
|
type: string
|
|
default: ""
|
|
|
|
permissions:
|
|
contents: read
|
|
packages: read
|
|
|
|
env:
|
|
TEST_DEPLOY_TYPE: server
|
|
DISTROS: ${{ inputs.distros }}
|
|
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
|
|
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
|
|
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"
|
|
|
|
server:
|
|
name: 🌐 Deploy ${{ matrix.app }}
|
|
runs-on: ubuntu-latest
|
|
timeout-minutes: 360
|
|
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: Deploy app
|
|
shell: bash
|
|
run: |
|
|
set -euo pipefail
|
|
export TEST_DEPLOY_TYPE="server"
|
|
export APP="${{ matrix.app }}"
|
|
make ci-deploy-app
|