Files
computer-playbook/.github/workflows/test-deploy-server.yml
T
kevinveenbirkenbach 97642e949c ci(release): switch to immutable ci-<sha> image tags and retag on release
- Build CI images with immutable ci-<sha> tags instead of latest
- Pass CI image tag into deploy workflows via INFINITO_IMAGE_TAG
- Derive CI_TAG from checked-out release tag commit
- Retag CI images to <version> and latest on release (no rebuild)
- Make release scripts independent from GITHUB_SHA coupling
- Improve robustness and reproducibility of release pipeline

https://chatgpt.com/share/696832f6-35e4-800f-a574-178013d4426e
2026-01-15 01:20:39 +01:00

107 lines
2.4 KiB
YAML

name: Test Infinito.Nexus Deploy (server)
on:
workflow_call:
workflow_dispatch:
permissions:
contents: read
packages: read
env:
TEST_DEPLOY_TYPE: server
DISTROS: "arch debian ubuntu fedora centos"
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 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 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