website/.gitea/workflows/build-api.yml
ngn 26362cf89d
[skip ci] add path filters to workflows
Signed-off-by: ngn <ngn@ngn.tf>
2025-03-25 00:08:09 +03:00

31 lines
732 B
YAML

name: Build the docker image for the API
on:
push:
branches: ["main"]
paths: ["api/**"]
env:
REGISTRY: git.ngn.tf
IMAGE: ${{gitea.repository}}/api
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: "https://github.com/actions/checkout@v4"
- name: Login to container repo
uses: "https://github.com/docker/login-action@v1"
with:
registry: ${{env.REGISTRY}}
username: ${{gitea.actor}}
password: ${{secrets.PACKAGES_TOKEN}}
- name: Build image
run: |
cd api
docker build --tag ${{env.REGISTRY}}/${{env.IMAGE}}:latest .
docker push ${{env.REGISTRY}}/${{env.IMAGE}}:latest