wip ci/cd
All checks were successful
Gitea Actions Demo / Explore-Gitea-Actions (push) Successful in 49s

This commit is contained in:
2026-03-07 19:10:32 +03:00
parent f9c32c3e15
commit 1cee55a0cf
3 changed files with 12 additions and 4 deletions

View File

@@ -39,6 +39,6 @@ jobs:
- name: List files in the repository
run: |
ls ${{ gitea.workspace }}
touch hello_world.log
docker run -d --name tracker -p 9999:3000 git.madsky.ru/vadim/tracker:latest
- name: Execute a single command
run: echo "Hello, world!!"
run: echo "Hello, world!"

View File

@@ -1,8 +1,15 @@
FROM golang:1.25
# --- Stage 1: builder ---
FROM golang:1.25 AS builder
WORKDIR /app
COPY go.mod go.sum ./
RUN go mod download
COPY . .
RUN CGO_ENABLED=0 go build -o main ./cmd/main.go
# --- Stage 2: Runner ---
FROM alpine:latest
WORKDIR /app
COPY --from=builder /app/main .
COPY --from=builder /app/config .
EXPOSE 3000
CMD ["./main"]

View File

@@ -1,7 +1,7 @@
# Hello world
```shell
FROM golang:tip-trixie AS builder
FROM golang:1.25 AS builder
WORKDIR /app
COPY go.mod go.sum ./
RUN go mod download
@@ -12,6 +12,7 @@ RUN CGO_ENABLED=0 go build -o main ./cmd/main.go
FROM alpine:latest
WORKDIR /app
COPY --from=builder /app/main .
COPY --from=builder /app/config .
EXPOSE 3000
CMD ["./main"]
```