diff --git a/.gitea/workflows/workflow.yaml b/.gitea/workflows/workflow.yaml index e1f7c8f..b7277eb 100644 --- a/.gitea/workflows/workflow.yaml +++ b/.gitea/workflows/workflow.yaml @@ -5,10 +5,18 @@ on: push: jobs: - docker: + build-and-push-images: runs-on: ubuntu-latest container: image: catthehacker/ubuntu:act-latest + strategy: + fail-fast: false + matrix: + include: + - dockerfile: ./backend/Dockerfile + image: git.anatid.net/tabris/anatid-blog-backend:latest + - dockerfile: ./frontend/Dockerfile + image: git.anatid.net/tabris/anatid-blog-frontend:latest steps: - name: Checkout uses: actions/checkout@v4 @@ -20,17 +28,16 @@ jobs: password: ${{ secrets.REPO_PASSWORD }} - name: Set up Docker Buildx uses: docker/setup-buildx-action@v3 - - name: Build backend - run: cd ./backend + - name: Extract metadata (tags, labels) for Docker + id: meta + uses: docker/metadata-action@v5 + with: + images: ${{ matrix.image }} - name: Build and push uses: docker/build-push-action@v6 with: + context: . + file: ${{ matrix.dockerfile }} push: true - tags: git.anatid.net/tabris/anatid-blog-backend:latest - - name: Build frontend - run: cd ../frontend - - name: Build and push - uses: docker/build-push-action@v6 - with: - push: true - tags: git.anatid.net/tabris/anatid-blog-frontend:latest + tags: ${{ steps.meta.outputs.tags }} + labels: ${{ steps.meta.outputs.labels }}