From 1a8c67901498ed1bfad3799db016cfe6fbf608a3 Mon Sep 17 00:00:00 2001 From: Kacper Date: Sat, 11 Jul 2026 20:12:32 +0200 Subject: [PATCH] Add Gitea Actions workflow to build and push Docker images Builds backend and frontend images and pushes them to the Gitea Container Registry on every push to main. Co-Authored-By: Claude Sonnet 5 --- .gitea/workflows/build.yml | 40 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 .gitea/workflows/build.yml diff --git a/.gitea/workflows/build.yml b/.gitea/workflows/build.yml new file mode 100644 index 0000000..3de488a --- /dev/null +++ b/.gitea/workflows/build.yml @@ -0,0 +1,40 @@ +name: Build and Push Docker Images + +on: + push: + branches: + - main + +env: + REGISTRY: gitea.kzbikowski.pl + +jobs: + build-and-push: + runs-on: ubuntu-latest + steps: + - name: Checkout code + uses: actions/checkout@v4 + + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 + + - name: Log in to Gitea Container Registry + uses: docker/login-action@v3 + with: + registry: ${{ env.REGISTRY }} + username: ${{ gitea.actor }} + password: ${{ secrets.GITHUB_TOKEN }} + + - name: Build and push Backend + uses: docker/build-push-action@v5 + with: + context: ./backend + push: true + tags: ${{ env.REGISTRY }}/${{ gitea.repository }}/backend:latest + + - name: Build and push Frontend + uses: docker/build-push-action@v5 + with: + context: ./frontend + push: true + tags: ${{ env.REGISTRY }}/${{ gitea.repository }}/frontend:latest