45 lines
1.3 KiB
YAML
45 lines
1.3 KiB
YAML
---
|
|
name: Build and Push to Gitea
|
|
|
|
on:
|
|
push:
|
|
branches: ["master"]
|
|
|
|
jobs:
|
|
build-and-push:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout Code
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Set up Go
|
|
uses: actions/setup-go@v5
|
|
with:
|
|
go-version: "1.25.x"
|
|
check-latest: true
|
|
cache: true
|
|
|
|
- name: Run Backend Tests
|
|
env:
|
|
RUN_LIVE_OPENAI_TESTS: "0"
|
|
run: go test ./...
|
|
|
|
- name: Login to Gitea Registry
|
|
env:
|
|
GIT_DOMAIN: ${{ secrets.GIT_DOMAIN }}
|
|
GIT_USERNAME: ${{ secrets.GIT_USERNAME }}
|
|
GIT_TOKEN: ${{ secrets.GIT_TOKEN }}
|
|
run: echo "$GIT_TOKEN" | docker login "$GIT_DOMAIN" -u "$GIT_USERNAME" --password-stdin
|
|
|
|
- name: Build and Push Backend
|
|
env:
|
|
GIT_DOMAIN: ${{ secrets.GIT_DOMAIN }}
|
|
GIT_USERNAME: ${{ secrets.GIT_USERNAME }}
|
|
run: docker build -t "$GIT_DOMAIN/$GIT_USERNAME/resumelens/backend:latest" . && docker push "$GIT_DOMAIN/$GIT_USERNAME/resumelens/backend:latest"
|
|
|
|
- name: Build and Push Frontend
|
|
env:
|
|
GIT_DOMAIN: ${{ secrets.GIT_DOMAIN }}
|
|
GIT_USERNAME: ${{ secrets.GIT_USERNAME }}
|
|
run: docker build -t "$GIT_DOMAIN/$GIT_USERNAME/resumelens/frontend:latest" ./web && docker push "$GIT_DOMAIN/$GIT_USERNAME/resumelens/frontend:latest"
|