diff --git a/.gitea/workflows/ci-api.yml b/.gitea/workflows/ci-api.yml index daf139f..f7dcecd 100644 --- a/.gitea/workflows/ci-api.yml +++ b/.gitea/workflows/ci-api.yml @@ -31,31 +31,32 @@ jobs: - name: Vet run: go vet ./... - continue-on-error: true + + - name: Test + run: go test ./... - name: Build run: go build ./... - name: Install & run gosec - working-directory: backend/gestion continue-on-error: true run: | go install github.com/securego/gosec/v2/cmd/gosec@latest gosec ./... - - name: Checkout - uses: actions/checkout@v4 - - name: Set up Docker Buildx + if: github.event_name == 'push' && github.ref == 'refs/heads/main' uses: docker/setup-buildx-action@v3 - name: Log in to Docker Hub + if: github.event_name == 'push' && github.ref == 'refs/heads/main' uses: docker/login-action@v3 with: username: ${{ secrets.DOCKERHUB_USERNAME }} password: ${{ secrets.DOCKERHUB_TOKEN }} - name: Build & push api + if: github.event_name == 'push' && github.ref == 'refs/heads/main' uses: docker/build-push-action@v6 with: context: ./control-plane/api diff --git a/.gitea/workflows/ci-web.yml b/.gitea/workflows/ci-web.yml index 3428fde..a5f2a50 100644 --- a/.gitea/workflows/ci-web.yml +++ b/.gitea/workflows/ci-web.yml @@ -38,24 +38,23 @@ jobs: - name: Test run: npm test - continue-on-error: true - name: Build run: npm run build - - name: Checkout - uses: actions/checkout@v4 - - name: Set up Docker Buildx + if: github.event_name == 'push' && github.ref == 'refs/heads/main' uses: docker/setup-buildx-action@v3 - name: Log in to Docker Hub + if: github.event_name == 'push' && github.ref == 'refs/heads/main' uses: docker/login-action@v3 with: username: ${{ secrets.DOCKERHUB_USERNAME }} password: ${{ secrets.DOCKERHUB_TOKEN }} - name: Build & push web + if: github.event_name == 'push' && github.ref == 'refs/heads/main' uses: docker/build-push-action@v6 with: context: ./web