cicd fix
Build & Push Docker Images / test-backend (push) Successful in 45s
Build & Push Docker Images / test-frontend (push) Successful in 1m0s
Build & Push Docker Images / build-backend (push) Successful in 1m56s
Build & Push Docker Images / build-frontend (push) Failing after 1m54s

This commit is contained in:
Antoni Nuñez Romeu
2026-05-21 15:55:51 +02:00
parent 2eff93e66a
commit 58ba68e0e1
+43 -43
View File
@@ -4,63 +4,63 @@ run-name: ${{ gitea.actor }} - ${{ gitea.ref }}
on: on:
push: push:
branches: branches:
- main - main
jobs: jobs:
test-backend: test-backend:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/checkout@v3 - uses: actions/checkout@v3
- name: Install dependencies - name: Install dependencies
run: cd backend && npm ci run: cd backend && npm ci
- name: Run tests - name: Run tests
run: cd backend && npm test run: cd backend && npm test
test-frontend: test-frontend:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/checkout@v3 - uses: actions/checkout@v3
- name: Install dependencies - name: Install dependencies
run: cd frontend && npm ci run: cd frontend && npm ci
- name: Run tests - name: Run tests
run: cd frontend && npm test run: cd frontend && npm test
build-backend: build-backend:
needs: [test-backend, test-frontend] needs: [ test-backend, test-frontend ]
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/checkout@v3 - uses: actions/checkout@v3
- name: Log in to Gitea registry - name: Log in to Gitea registry
uses: docker/login-action@v3 uses: docker/login-action@v3
with: with:
registry: git.hacecalor.net registry: git.hacecalor.net
username: ${{ gitea.actor }} username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ gitea.token }} password: ${{ secrets.DOCKER_PASSWORD }}
- name: Build and push backend image - name: Build and push backend image
uses: docker/build-push-action@v5 uses: docker/build-push-action@v5
with: with:
context: ./backend context: ./backend
push: true push: true
tags: | tags: |
git.hacecalor.net/ichitux/farmafinder-backend:latest git.hacecalor.net/ichitux/farmafinder-backend:latest
git.hacecalor.net/ichitux/farmafinder-backend:${{ gitea.sha }} git.hacecalor.net/ichitux/farmafinder-backend:${{ gitea.sha }}
build-frontend: build-frontend:
needs: [test-backend, test-frontend] needs: [ test-backend, test-frontend ]
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/checkout@v3 - uses: actions/checkout@v3
- name: Log in to Gitea registry - name: Log in to Gitea registry
uses: docker/login-action@v3 uses: docker/login-action@v3
with: with:
registry: git.hacecalor.net registry: git.hacecalor.net
username: ${{ gitea.actor }} username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ gitea.token }} password: ${{ secrets.DOCKER_PASSWORD }}
- name: Build and push frontend image - name: Build and push frontend image
uses: docker/build-push-action@v5 uses: docker/build-push-action@v5
with: with:
context: ./frontend context: ./frontend
push: true push: true
tags: | tags: |
git.hacecalor.net/ichitux/farmafinder-frontend:latest git.hacecalor.net/ichitux/farmafinder-frontend:latest
git.hacecalor.net/ichitux/farmafinder-frontend:${{ gitea.sha }} git.hacecalor.net/ichitux/farmafinder-frontend:${{ gitea.sha }}