43 lines
1.2 KiB
YAML
43 lines
1.2 KiB
YAML
name: Build
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- master
|
|
- main
|
|
- codex/production-intelligence-terminal
|
|
pull_request:
|
|
|
|
jobs:
|
|
test-and-image:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Set up Node
|
|
uses: actions/setup-node@v4
|
|
with:
|
|
node-version: "22"
|
|
cache: npm
|
|
|
|
- name: Install dependencies
|
|
run: npm ci
|
|
|
|
- name: Unit tests
|
|
run: npm run test:unit
|
|
|
|
- name: Compose config
|
|
run: docker compose config
|
|
|
|
- name: Build Docker image
|
|
run: docker build -t git.wilkensxl.de/mrsphay/intelligence-terminal:${{ github.sha }} .
|
|
|
|
- name: Publish Docker image
|
|
if: ${{ secrets.REGISTRY_TOKEN != '' }}
|
|
run: |
|
|
echo "${{ secrets.REGISTRY_TOKEN }}" | docker login git.wilkensxl.de -u "${{ github.repository_owner }}" --password-stdin
|
|
docker tag git.wilkensxl.de/mrsphay/intelligence-terminal:${{ github.sha }} git.wilkensxl.de/mrsphay/intelligence-terminal:latest
|
|
docker push git.wilkensxl.de/mrsphay/intelligence-terminal:${{ github.sha }}
|
|
docker push git.wilkensxl.de/mrsphay/intelligence-terminal:latest
|