Files
andris-carservice/.gitea/workflows/deploy.yml
T
Hermes f7a9906add
Build and publish images / docker (push) Canceled after 0s
carservice: initial commit
2026-07-20 20:51:23 +01:00

22 lines
744 B
YAML

name: Build and publish images
on:
push:
branches: [main]
jobs:
docker:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Build and push images to the Gitea registry
run: |
REGISTRY="${GITHUB_SERVER_URL#http://}"
REGISTRY="${REGISTRY#https://}"
REPO="${GITHUB_REPOSITORY,,}"
echo "${{ secrets.GITHUB_TOKEN }}" | docker login "$REGISTRY" -u "${{ github.actor }}" --password-stdin
docker build -t "$REGISTRY/$REPO/backend:latest" -f Dockerfile .
docker push "$REGISTRY/$REPO/backend:latest"
docker build -t "$REGISTRY/$REPO/frontend:latest" -f Dockerfile.frontend .
docker push "$REGISTRY/$REPO/frontend:latest"