try to deploy en nas
Build & Deploy / build (push) Successful in 42s
Build & Deploy / docker (push) Failing after 0s

This commit is contained in:
Kevin
2026-06-28 11:44:53 +02:00
parent 9cb4909481
commit f2edb9b61e
+40 -6
View File
@@ -1,17 +1,18 @@
name: Build Project name: Build & Deploy
on: on:
push: push:
branches: [main, master] branches: [main]
pull_request: pull_request:
branches: [main, master] branches: [main]
jobs: jobs:
build: build:
runs-on: linux # Doit correspondre à GITEA_RUNNER_LABELS (ex: linux:docker,dind) runs-on: linux
container: node:24 # Utilise l'image officielle Node.js 24 container: node:24
steps: steps:
- name: Checkout repository - name: Checkout repository
uses: actions/checkout@v4 # Action Gitea pour checkout uses: actions/checkout@v4
with: with:
fetch-depth: 0 fetch-depth: 0
@@ -20,3 +21,36 @@ jobs:
- name: Build project - name: Build project
run: npm run build run: npm run build
docker:
needs: build
runs-on: linux
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to Gitea Container Registry
uses: docker/login-action@v3
with:
registry: http://192.168.1.39:3000
username: ${{ secrets.GITEA_USERNAME }}
password: ${{ secrets.GITEA_TOKEN }}
- name: Build and push
uses: docker/build-push-action@v5
with:
context: .
push: true
tags: |
192.168.1.39:3000/username/pc-builder:latest
192.168.1.39:3000/username/pc-builder:${{ github.sha }}
cache-from: type=gha
cache-to: type=gha,mode=max
- name: Trigger deploy
run: |
curl -X POST http://192.168.1.39:9000/deploy || echo "Deploy webhook not reachable"