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

This commit is contained in:
2026-03-06 18:46:43 +03:00
parent f630b4436a
commit f5ad5dbb16
3 changed files with 40 additions and 11 deletions

View File

@@ -1,19 +1,17 @@
name: Gitea Actions Demo name: Gitea Actions Demo
run-name: ${{ gitea.actor }} is testing out Gitea Actions 🚀 run-name: Deploy 🚀
on: [push] on:
push:
branches:
- main
jobs: jobs:
Explore-Gitea-Actions: Explore-Gitea-Actions:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- run: echo "🎉 The job was automatically triggered by a ${{ gitea.event_name }} event.."
- run: echo "🐧 This job is now running on a ${{ runner.os }} server hosted by Gitea!"
- run: echo "🔎 The name of your branch is ${{ gitea.ref }} and your repository is ${{ gitea.repository }}."
- name: Check out repository code
uses: actions/checkout@v3
- run: echo "💡 The ${{ gitea.repository }} repository has been cloned to the runner."
- run: echo "🖥️ The workflow is now ready to test your code on the runner!"
- name: List files in the repository - name: List files in the repository
run: | run: |
ls ${{ gitea.workspace }} ls ${{ gitea.workspace }}
- run: echo "🍏 This job's status is ${{ job.status }}."
- name: Execute a single command
run: echo "Hello, world!"

8
Dockerfile Normal file
View File

@@ -0,0 +1,8 @@
FROM golang:latest
WORKDIR /app
COPY go.mod go.sum ./
RUN go mod download
COPY . .
RUN CGO_ENABLED=0 go build -o main ./cmd/main.go
EXPOSE 3000
CMD ["./main"]

View File

@@ -1 +1,24 @@
# Hello world # Hello world
```Bash
FROM golang:tip-trixie 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 .
EXPOSE 3000
CMD ["./main"]
```
```
docker build --tag docker-gs-ping .
```