anatid-blog/.gitea/workflows/workflow.yaml
Phill Pover 9682a263fd
Some checks failed
Anatid Blog CI Workflow / build-and-push-images (./backend/Dockerfile, git.anatid.net/tabris/anatid-blog-backend, ./backend) (push) Failing after 17s
Anatid Blog CI Workflow / build-and-push-images (./frontend/Dockerfile, git.anatid.net/tabris/anatid-blog-frontend, ./frontend) (push) Failing after 21s
Setting working directory
2025-03-27 10:58:53 +00:00

57 lines
1.8 KiB
YAML

name: Anatid Blog CI Workflow
run-name: ${{ gitea.actor }} is running Anatid Blog Workflow
on:
push:
jobs:
build-and-push-images:
runs-on: ubuntu-latest
container:
image: catthehacker/ubuntu:act-latest
strategy:
fail-fast: false
matrix:
include:
- workingdir: ./backend
dockerfile: ./backend/Dockerfile
image: git.anatid.net/tabris/anatid-blog-backend
- workingdir: ./frontend
dockerfile: ./frontend/Dockerfile
image: git.anatid.net/tabris/anatid-blog-frontend
steps:
- name: Checkout
uses: actions/checkout@v4
- name: CD to app folder
run: cd ${{ matrix.workingdir }} && ls -al
- name: Loging to docker hub registry
uses: docker/login-action@v3
with:
username: ${{ vars.DOCKER_HUB_USERNAME }}
password: ${{ secrets.DOCKER_HUB_PASSWORD }}
- name: Login to gitea container registry
uses: docker/login-action@v3
with:
registry: git.anatid.net
username: ${{ vars.REPO_USERNAME }}
password: ${{ secrets.REPO_PASSWORD }}
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@v5
with:
images: ${{ matrix.image }}
- name: Check build
run: ls -al
working-directory: ./${{ matrix.workingdir }}
- name: Build and push
uses: docker/build-push-action@v6
working-directory: ./${{ matrix.workingdir }}
with:
context: .
file: ${{ matrix.dockerfile }}
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}