Skip to content

[DRAFT] Agent-based rewrite of a new REST API and UI #470

[DRAFT] Agent-based rewrite of a new REST API and UI

[DRAFT] Agent-based rewrite of a new REST API and UI #470

Workflow file for this run

name: Build LNT Docker image
on:
- push
- pull_request
permissions:
contents: read
jobs:
build:
runs-on: ubuntu-24.04
permissions:
packages: write
steps:
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8
with:
fetch-depth: 0 # fetch all history including tags -- necessary to determine the version from SCM
- name: Log in to the Container registry
uses: docker/login-action@5e57cd118135c172c3672efd75eb46360885c0ef
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push Docker image
id: push
uses: docker/build-push-action@263435318d21b8e681c14492fe198d362a7d2c83
with:
# Only push to ghcr.io on pushes to the main branch
push: ${{ github.ref == 'refs/heads/main' }}
# Tag images with the current SHA and with 'latest'
tags: "ghcr.io/llvm/llvm-lnt:latest,ghcr.io/llvm/llvm-lnt:${{ github.sha }}"
file: docker/lnt.dockerfile
# Use the current directory as context, as checked out by actions/checkout -- needed for setuptools_scm
context: .
- name: Smoke test - start server and ping it
run: |
docker compose -f docker/compose.yaml up --build --detach
timeout 120 bash -c 'until curl -sf http://localhost:8000; do sleep 2; done'
curl -f http://localhost:8000
env:
LNT_DB_PASSWORD: smoke-test-password
LNT_AUTH_TOKEN: smoke-test-token
- name: Dump logs on failure
if: failure()
run: docker compose -f docker/compose.yaml logs
- name: Teardown
if: always()
run: docker compose -f docker/compose.yaml down