ci(docker): add node image build-and-push job to workflow
Some checks failed
Build and Push Docker Images / Build app image (push) Failing after 11s
Build and Push Docker Images / Build database image (push) Successful in 10s
Build and Push Docker Images / Build node image (push) Failing after 10s

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
thibaud-leclere
2026-03-28 14:00:32 +01:00
parent cb0ea949f6
commit ae9b0fdba7

View File

@@ -84,3 +84,43 @@ jobs:
git.lclr.dev/thibaud-lclr/ltbxd-actorle/database:${{ github.sha }} git.lclr.dev/thibaud-lclr/ltbxd-actorle/database:${{ github.sha }}
cache-from: type=registry,ref=git.lclr.dev/thibaud-lclr/ltbxd-actorle/database:buildcache cache-from: type=registry,ref=git.lclr.dev/thibaud-lclr/ltbxd-actorle/database:buildcache
cache-to: type=registry,ref=git.lclr.dev/thibaud-lclr/ltbxd-actorle/database:buildcache,mode=max cache-to: type=registry,ref=git.lclr.dev/thibaud-lclr/ltbxd-actorle/database:buildcache,mode=max
build-node:
name: Build node image
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 2
- name: Check if node image should be rebuilt
id: changed
run: |
CHANGED=$(git diff --name-only HEAD~1 HEAD | grep -E '^(docker/node/|assets/|package(-lock)?\.json|vite\.config\.js)' | wc -l)
echo "changed=$([ "$CHANGED" -gt 0 ] && echo true || echo false)" >> $GITHUB_OUTPUT
- name: Set up Docker Buildx
if: steps.changed.outputs.changed == 'true'
uses: docker/setup-buildx-action@v3
- name: Login to Gitea registry
if: steps.changed.outputs.changed == 'true'
uses: docker/login-action@v3
with:
registry: git.lclr.dev
username: ${{ github.actor }}
password: ${{ secrets.GITEA_TOKEN }}
- name: Build and push node
if: steps.changed.outputs.changed == 'true'
uses: docker/build-push-action@v6
with:
context: .
file: docker/node/Dockerfile
target: dev
push: true
tags: |
git.lclr.dev/thibaud-lclr/ltbxd-actorle/node:latest
git.lclr.dev/thibaud-lclr/ltbxd-actorle/node:${{ github.sha }}
cache-from: type=registry,ref=git.lclr.dev/thibaud-lclr/ltbxd-actorle/node:buildcache
cache-to: type=registry,ref=git.lclr.dev/thibaud-lclr/ltbxd-actorle/node:buildcache,mode=max