wip ci/cd
Some checks failed
Gitea Actions Demo / Explore-Gitea-Actions (push) Failing after 1m13s

This commit is contained in:
2026-03-07 13:34:24 +03:00
parent f5ad5dbb16
commit 2b089c68e6
5 changed files with 48 additions and 23 deletions

View File

@@ -1,17 +0,0 @@
name: Gitea Actions Demo
run-name: Deploy 🚀
on:
push:
branches:
- main
jobs:
Explore-Gitea-Actions:
runs-on: ubuntu-latest
steps:
- name: List files in the repository
run: |
ls ${{ gitea.workspace }}
- name: Execute a single command
run: echo "Hello, world!"

View File

@@ -0,0 +1,35 @@
name: Gitea Actions Demo
run-name: Deploy 🚀
on:
push:
branches:
- main
jobs:
Explore-Gitea-Actions:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v6
# - name: Setup Go
# uses: actions/setup-go@v6
# with:
# go-version: '1.25'
- name: Docker build
run: docker build --tag git.madsky.ru/vadim/tracker:latest .
- name: Login to gitea
uses: docker/login-action@v4
with:
registry: git.madsky.ru
username: ${{ vars.GITEA_USERNAME }}
password: ${{ secrets.GITEA_PASSWORD }}
- name: Push Docker image
run: |
IMAGE_TAG="git.madsky.ru/vadim/tracker:latest:${{ gitea.sha }}"
docker tag git.madsky.ru/vadim/tracker:latest $IMAGE_TAG
docker push $IMAGE_TAG
- name: List files in the repository
run: |
ls ${{ gitea.workspace }}
- name: Execute a single command
run: echo "Hello, world!"

1
.gitignore vendored
View File

@@ -28,3 +28,4 @@ coverage
*.tsbuildinfo
/bin/
/config/config.yaml
main

View File

@@ -1,4 +1,4 @@
BINARY_NAME=server
BINARY_NAME=main
MAIN_PACKAGE_PATH = ./cmd/main.go
.PHONY: tidy
@@ -8,12 +8,12 @@ tidy:
.PHONY: build
build:
CGO_ENABLED=0 go build -o bin/${BINARY_NAME} ${MAIN_PACKAGE_PATH}
CGO_ENABLED=0 go build -o ${BINARY_NAME} ${MAIN_PACKAGE_PATH}
# GOARCH=arm64 GOOS=darwin go build -o bin/${BINARY_NAME} ${MAIN_PACKAGE_PATH}
.PHONY: run
run: build
./bin/${BINARY_NAME}
./${BINARY_NAME}
.PHONY: gen
gen:

View File

@@ -1,6 +1,6 @@
# Hello world
```Bash
```shell
FROM golang:tip-trixie AS builder
WORKDIR /app
COPY go.mod go.sum ./
@@ -16,9 +16,15 @@ EXPOSE 3000
CMD ["./main"]
```
```
docker build --tag docker-gs-ping .
```shell
docker build --tag git.madsky.ru/vadim/tracker:latest .
```
```shell
docker push git.madsky.ru/vadim/tracker
```
```shell
docker login git.madsky.ru
```