chore: dispatch ci
ci-web / test (push) Has been cancelled
ci-web / publish (push) Has been cancelled
ci-api / test (push) Failing after 26m55s
ci-api / publish (push) Failing after 14m58s

This commit is contained in:
Nuxgrid
2026-07-27 16:48:41 +02:00
parent 6b4274d12b
commit 6ff6333781
3 changed files with 138 additions and 47 deletions
+67
View File
@@ -0,0 +1,67 @@
name: ci-api
# CI pour control-plane/api (Go) : build, vet, tests, puis publication de l'image
# Docker sur push vers main.
on:
push:
branches: [main]
paths:
- "control-plane/api/**"
- ".gitea/workflows/ci-api.yml"
pull_request:
paths:
- "control-plane/api/**"
- ".gitea/workflows/ci-api.yml"
workflow_dispatch: {}
jobs:
test:
runs-on: ubuntu-latest
defaults:
run:
working-directory: control-plane/api
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: "1.26.0"
cache-dependency-path: control-plane/api/go.sum
- name: Vet
run: go vet ./...
- name: Build
run: go build ./...
- name: Test
run: go test ./...
publish:
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
needs: test
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Log in to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build & push api
uses: docker/build-push-action@v6
with:
context: ./control-plane/api
file: ./control-plane/api/Dockerfile
push: true
tags: |
${{ secrets.DOCKERHUB_USERNAME }}/omnex-api:latest