Add gitea workflow #78
24
.gitea/workflows/build.yml
Normal file
24
.gitea/workflows/build.yml
Normal file
@ -0,0 +1,24 @@
|
|||||||
|
name: Backend Build and Test
|
||||||
|
on: [push]
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
runs-on: standard-latest
|
||||||
|
steps:
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- name: Setup Go
|
||||||
|
uses: actions/setup-go@v5
|
||||||
|
with:
|
||||||
|
go-version: '>=1.24'
|
||||||
|
|
||||||
|
- name: Build
|
||||||
|
run: |
|
||||||
|
cd backend
|
||||||
|
go build .
|
||||||
|
|
||||||
|
- name: Test
|
||||||
|
run: |
|
||||||
|
cd backend
|
||||||
|
go test . -v
|
25
.gitea/workflows/deploy.yml
Normal file
25
.gitea/workflows/deploy.yml
Normal file
@ -0,0 +1,25 @@
|
|||||||
|
name: Backend Deploy
|
||||||
|
on:
|
||||||
|
push: [main]
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
runs-on: standard-latest
|
||||||
|
steps:
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- name: Login
|
||||||
|
with:
|
||||||
|
package_rw: ${{ secrets.PACKAGE_RW }}
|
||||||
|
run: docker login gitea.seeseepuff.be -u seeseemelk -p ${{ secrets.PACKAGE_RW }}
|
||||||
|
|
||||||
|
- name: Build
|
||||||
|
run: |
|
||||||
|
cd backend
|
||||||
|
docker build -t gitea.seeseepuff.be/seeseemelk/wolproxy:$(git rev-parse --short HEAD) .
|
||||||
|
|
||||||
|
- name: Push
|
||||||
|
run: |
|
||||||
|
cd backend
|
||||||
|
docker push gitea.seeseepuff.be/seeseemelk/wolproxy:$(git rev-parse --short HEAD)
|
14
backend/Dockerfile
Normal file
14
backend/Dockerfile
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
FROM golang:1.24.2-alpine3.21
|
||||||
|
|
||||||
|
WORKDIR /app
|
||||||
|
COPY go.mod go.sum ./
|
||||||
|
RUN go mod download
|
||||||
|
|
||||||
|
COPY migrations ./migrations/
|
||||||
|
COPY *.go ./
|
||||||
|
COPY *.gohtml ./
|
||||||
|
RUN go build -o /allowance_planner
|
||||||
|
|
||||||
|
EXPOSE 8080
|
||||||
|
ENV GIN_MODE=release
|
||||||
|
CMD ["/allowance_planner"]
|
Loading…
x
Reference in New Issue
Block a user