Compare commits

...

81 Commits

Author SHA1 Message Date
d466aefff4 optimize gitea_deploy
All checks were successful
Deploy Gitea Custom / build-and-deploy (push) Successful in 12m11s
2025-08-26 09:54:01 +03:00
e05a7361ba optimize gitea_deploy
All checks were successful
Deploy Gitea Custom / build-and-deploy (push) Successful in 11m56s
2025-08-26 09:39:01 +03:00
0650c1a984 optimize gitea_deploy
Some checks failed
Deploy Gitea Custom / build-and-deploy (push) Failing after 14m27s
2025-08-26 09:22:48 +03:00
4ec7102537 fix
All checks were successful
Deploy Gitea Custom / build-and-deploy (push) Successful in 13m20s
2025-08-25 22:06:12 +03:00
11df16babb fix
Some checks failed
Deploy Gitea Custom / build-and-deploy (push) Failing after 16m55s
2025-08-25 21:10:59 +03:00
5eb21d40b7 fix
Some checks failed
Deploy Gitea Custom / build-and-deploy (push) Failing after 13m0s
2025-08-25 19:30:07 +03:00
1a3abdfc48 fix
Some checks failed
Deploy Gitea Custom / build-and-deploy (push) Failing after 15m39s
2025-08-25 19:01:01 +03:00
213ab592f5 added runner
Some checks failed
Deploy Gitea Custom / build-and-deploy (push) Failing after 8s
2025-08-25 18:56:44 +03:00
3d4d42b107 finish podman start ok
Some checks failed
Deploy Gitea Custom / build-and-deploy (push) Failing after 7s
2025-08-25 15:20:35 +03:00
60e4723788 finish podman start ok
Some checks failed
Deploy Gitea Custom / build-and-deploy (push) Failing after 9s
2025-08-25 15:16:22 +03:00
b4232858e2 upd
All checks were successful
Deploy Gitea Custom / build-and-deploy (push) Successful in 3m54s
2025-08-25 14:55:12 +03:00
5599a2a2c3 upd
Some checks failed
Deploy Gitea Custom / build-and-deploy (push) Has been cancelled
2025-08-25 14:53:13 +03:00
8cf47da99b upd
Some checks failed
Deploy Gitea Custom / build-and-deploy (push) Failing after 3m14s
2025-08-25 14:46:09 +03:00
c903ba3e2f upd
Some checks failed
Deploy Gitea Custom / build-and-deploy (push) Failing after 3m20s
2025-08-25 14:41:26 +03:00
5a48c5b0a2 upd
Some checks failed
Deploy Gitea Custom / build-and-deploy (push) Failing after 5m2s
2025-08-25 14:31:21 +03:00
68e99dce40 upd
Some checks failed
Deploy Gitea Custom / build-and-deploy (push) Failing after 10s
2025-08-25 14:26:53 +03:00
acc28b2abf upd
Some checks failed
Deploy Gitea Custom / build-and-deploy (push) Failing after 6s
2025-08-25 14:16:55 +03:00
11b082cdf3 upd
Some checks failed
Deploy Gitea Custom / build-and-deploy (push) Failing after 34s
2025-08-25 14:14:51 +03:00
c90ec94bef upd
Some checks failed
Deploy Gitea Custom / build-and-deploy (push) Failing after 0s
2025-08-25 14:13:18 +03:00
78bfd13713 upd
Some checks failed
Deploy Gitea Custom / build-and-deploy (push) Failing after 0s
2025-08-25 14:00:23 +03:00
3c5311b69d upd
Some checks failed
Deploy Gitea Custom / build-and-deploy (push) Failing after 0s
2025-08-25 13:53:21 +03:00
88705bf90a added workflow for configurated podman
Some checks failed
Deploy Gitea Custom / build-and-deploy (push) Failing after 1m19s
2025-08-25 13:50:05 +03:00
061087c17d added workflow for configurated podman
Some checks failed
Deploy Gitea Custom / build-and-deploy (push) Failing after 6s
2025-08-25 13:36:32 +03:00
148dbc11f8 upd
All checks were successful
Deploy Gitea Custom / build-and-deploy (push) Successful in 3m30s
2025-08-25 13:30:02 +03:00
3538412083 upd 2025-08-25 13:29:13 +03:00
b28daabe16 upd
Some checks failed
Deploy Gitea Custom / build-and-deploy (push) Failing after 2m42s
2025-08-25 13:21:39 +03:00
5018430d75 upd
Some checks failed
Deploy Gitea Custom / build-and-deploy (push) Failing after 53s
2025-08-25 13:14:04 +03:00
624d1192fa upd
Some checks failed
Deploy Gitea Custom / build-and-deploy (push) Failing after 47s
2025-08-25 13:10:59 +03:00
df792efa86 upd
Some checks failed
Deploy Gitea Custom / build-and-deploy (push) Failing after 2m56s
2025-08-25 13:06:29 +03:00
1669f55975 upd
Some checks failed
Deploy Gitea Custom / build-and-deploy (push) Failing after 3m11s
2025-08-25 12:55:08 +03:00
e5844e38a0 upd
Some checks failed
Deploy Gitea Custom / build-and-deploy (push) Failing after 3m38s
2025-08-25 12:35:04 +03:00
f27c423761 upd
Some checks failed
Deploy Gitea Custom / build-and-deploy (push) Failing after 2m16s
2025-08-25 12:31:18 +03:00
c97b1305ca upd
Some checks failed
Deploy Gitea Custom / build-and-deploy (push) Failing after 33s
2025-08-25 12:29:32 +03:00
c2e954ca64 upd
Some checks failed
Deploy Gitea Custom / build-and-deploy (push) Failing after 2m10s
2025-08-25 12:20:06 +03:00
35595ad288 upd
Some checks failed
Deploy Gitea Custom / build-and-deploy (push) Failing after 33s
2025-08-25 12:18:32 +03:00
a690d8996b upd
Some checks failed
Deploy Gitea Custom / build-and-deploy (push) Failing after 31s
2025-08-25 12:12:34 +03:00
ce2ee00d08 upd
Some checks failed
Deploy Gitea Custom / build-and-deploy (push) Failing after 6s
2025-08-25 12:05:06 +03:00
6db612fd62 upd
Some checks failed
Deploy Gitea Custom / build-and-deploy (push) Failing after 8m19s
2025-08-25 11:53:54 +03:00
d08346707a upd
Some checks failed
Deploy Gitea Custom / build-and-deploy (push) Failing after 1m13s
2025-08-25 11:05:33 +03:00
e8bb63537e upd
Some checks failed
Deploy Gitea Custom / build-and-deploy (push) Failing after 33s
2025-08-25 11:00:41 +03:00
fde4da00e1 upd
Some checks failed
Deploy Gitea Custom / build-and-deploy (push) Failing after 3m16s
2025-08-25 10:54:47 +03:00
f850bb49d9 upd
Some checks failed
Deploy Gitea Custom / build-and-deploy (push) Failing after 42s
2025-08-25 10:51:49 +03:00
8d7d4a4469 upd
Some checks failed
Deploy Gitea Custom / build-and-deploy (push) Failing after 53s
2025-08-25 10:48:14 +03:00
308efdc08d upd
Some checks failed
Deploy Gitea Custom / build-and-deploy (push) Failing after 50s
2025-08-25 10:45:50 +03:00
45d4045bd0 upd
Some checks failed
Deploy Gitea Custom / build-and-deploy (push) Failing after 37s
2025-08-25 10:37:37 +03:00
1fb784ebfd upd
Some checks failed
Deploy Gitea Custom / build-and-deploy (push) Failing after 24s
2025-08-25 10:35:07 +03:00
ac11110db1 upd 2025-08-25 10:32:05 +03:00
fdeb29a298 upd 2025-08-25 10:15:55 +03:00
85a32fd831 upd 2025-08-25 09:34:26 +03:00
b56854ea12 upd 2025-08-25 09:31:51 +03:00
f04bda5c79 upd 2025-08-25 09:29:15 +03:00
5005a2bc18 upd 2025-08-25 09:26:26 +03:00
6960e518b2 upd
Some checks failed
Deploy Gitea Custom / build-and-deploy (push) Has been cancelled
2025-08-24 21:39:27 +03:00
c1bbf14517 upd
Some checks failed
Deploy Gitea Custom / build-and-deploy (push) Failing after 4m22s
2025-08-24 21:34:09 +03:00
5e184cb75a upd
Some checks failed
Deploy Gitea Custom / build-and-deploy (push) Failing after 3m54s
2025-08-24 21:26:53 +03:00
e2a4ee3630 upd
All checks were successful
Deploy Gitea Custom / build-and-deploy (push) Successful in 9m14s
2025-08-24 21:06:42 +03:00
9a63355711 upd
All checks were successful
Deploy Gitea Custom / build-and-deploy (push) Successful in 6m10s
2025-08-24 20:48:17 +03:00
c3d33aaf3f upd
Some checks failed
Deploy Gitea Custom / build-and-deploy (push) Failing after 9m57s
2025-08-24 20:27:41 +03:00
23f4493af5 upd
Some checks failed
Deploy Gitea Custom / build-and-deploy (push) Failing after 23s
2025-08-24 20:25:18 +03:00
df1d5a280e upd
Some checks failed
Deploy Gitea Custom / build-and-deploy (push) Failing after 7m0s
2025-08-24 20:08:45 +03:00
1277612876 upd
Some checks failed
Deploy Gitea Custom / build-and-deploy (push) Failing after 47s
2025-08-24 18:59:56 +03:00
0d5b6dd7eb upd
Some checks failed
Deploy Gitea Custom / build-and-deploy (push) Failing after 46s
2025-08-24 18:54:50 +03:00
3515722e61 upd
Some checks failed
Deploy Gitea Custom / build-and-deploy (push) Failing after 48s
2025-08-24 18:46:40 +03:00
61095ea985 upd
Some checks failed
Deploy Gitea Custom / build-and-deploy (push) Failing after 32s
2025-08-24 18:40:58 +03:00
c277b7adc5 upd
Some checks failed
Deploy Gitea Custom / build-and-deploy (push) Failing after 34s
2025-08-24 18:37:05 +03:00
08905c9e9b upd
Some checks failed
Deploy Gitea Custom / build-and-deploy (push) Failing after 36s
2025-08-24 18:34:26 +03:00
2a53dff66f upd
Some checks failed
Deploy Gitea Custom / build-and-deploy (push) Failing after 8m24s
2025-08-24 18:10:17 +03:00
2ab5e8b19e upd
Some checks failed
Deploy Gitea Custom / build-and-deploy (push) Failing after 1m37s
2025-08-24 18:01:03 +03:00
fea9472e70 upd
Some checks failed
Deploy Gitea Custom / build-and-deploy (push) Failing after 2s
2025-08-24 17:53:51 +03:00
f4781244b2 upd
Some checks failed
Deploy Gitea Custom / build-and-deploy (push) Failing after 2s
2025-08-24 17:52:49 +03:00
50d1d24d04 upd
Some checks are pending
Deploy Gitea Custom / build-and-deploy (push) Waiting to run
2025-08-24 17:50:50 +03:00
1581efebd6 upd
Some checks are pending
Deploy Gitea Custom / build-and-deploy (push) Waiting to run
2025-08-24 17:47:15 +03:00
45edaba7cd upd 2025-08-24 17:36:24 +03:00
9d958d9004 upd 2025-08-24 17:29:12 +03:00
3ff3a33cc3 upd 2025-08-24 17:25:35 +03:00
b59b83bc6a upd 2025-08-24 17:17:20 +03:00
2ec83e03aa upd 2025-08-24 17:14:52 +03:00
9d008a9bff upd 2025-08-24 17:13:15 +03:00
f85a1ef210 try 2025-08-05 12:39:18 +03:00
9a30f5875f try 2025-08-05 12:36:27 +03:00
e32f799066 added deploy gitea need tests and resolve todo 2025-08-04 15:35:38 +03:00
2 changed files with 130 additions and 14 deletions

@ -0,0 +1,110 @@
name: Deploy Gitea Custom
run-name: ${{ gitea.actor }} deploying Gitea
on:
push:
branches:
- deploy_custom
env:
CONTAINER_NAME: gitea-production
VOLUME_NAME: gitea_data
jobs:
build-and-deploy:
runs-on: edge_pena_monitoring1
steps:
- name: Check out repository code
uses: http://gitea.pena:3000/PenaDevops/actions.git/checkout@v1
- name: Build container image
run: |
podman build \
--build-arg GITEA_VERSION=${{ github.ref_name }} \
-t gitea-custom:${{ github.ref_name }} .
- name: Remove old container
run: |
podman stop ${{ env.CONTAINER_NAME }} || true
podman rm ${{ env.CONTAINER_NAME }} || true
podman image prune -f
- name: Run new container with data persistence
run: |
# todo надо добавить по надобности другие переменные для гити
podman run -d --name ${{ env.CONTAINER_NAME }} \
-e GITEA__database__DB_TYPE=postgres \
-e GITEA__database__HOST=${{ secrets.GITEA_DB_HOST }} \
-e GITEA__database__NAME=${{ secrets.GITEA_DB_NAME }} \
-e GITEA__database__USER=${{ secrets.GITEA_DB_USER }} \
-e GITEA__database__PASSWD=${{ secrets.GITEA_DB_PASS }} \
-e USER_UID=1000 \
-e USER_GID=1000 \
-v ${{ env.VOLUME_NAME }}:/data \
-p 3001:3000 \
-p 2223:22 \
--restart unless-stopped \
localhost/gitea-custom:${{ github.ref_name }}
#jobs:
# build-and-deploy:
# runs-on: ubuntu-latest
#
# steps:
# - name: Checkout code
# uses: actions/checkout@v4
#
# - name: Set up Docker Buildx
# uses: docker/setup-buildx-action@v3
#
# - name: Build Docker image
# run: |
# docker build \
# --build-arg GITEA_VERSION=${{ env.GITEA_VERSION }} \
# -t gitea-custom:${{ github.sha }} \
# -t gitea-custom:latest .
#
# - name: Stop existing container
# run: |
# docker stop ${{ env.CONTAINER_NAME }} || true
#
# - name: Backup current container (optional)
# run: |
# docker commit ${{ env.CONTAINER_NAME }} gitea-backup:$(date +%Y%m%d_%H%M%S) || true
#
# - name: Remove old container
# run: |
# docker rm ${{ env.CONTAINER_NAME }} || true
#
# - name: Run new container with data persistence
# env:
# DB_HOST: ${{ secrets.GITEA_DB_HOST }}
# DB_USER: ${{ secrets.GITEA_DB_USER }}
# DB_PASS: ${{ secrets.GITEA_DB_PASS }}
# DB_NAME: ${{ secrets.GITEA_DB_NAME }}
# run: |
# # todo надо добавить по надобности другие переменные для гити
# docker run -d --name ${{ env.CONTAINER_NAME }} \
# -e GITEA__database__DB_TYPE=postgres \
# -e GITEA__database__HOST=${{ secrets.GITEA_DB_HOST }} \
# -e GITEA__database__NAME=${{ secrets.GITEA_DB_NAME }} \
# -e GITEA__database__USER=${{ secrets.GITEA_DB_USER }} \
# -e GITEA__database__PASSWD=${{ secrets.GITEA_DB_PASS }} \
# -e USER_UID=1000 \
# -e USER_GID=1000 \
# -v ${{ env.VOLUME_NAME }}:/data \
# -p 3000:3000 \
# -p 2222:22 \
# --restart unless-stopped \
# gitea-custom:latest
#
# - name: Wait for Gitea to start
# run: |
# sleep 30
#
# - name: Verify container is running
# run: |
# docker ps -a
# docker logs ${{ env.CONTAINER_NAME }} --tail 20
# docker inspect ${{ env.CONTAINER_NAME }} --format='{{.State.Status}}'

@ -1,39 +1,45 @@
# Build stage
FROM docker.io/library/golang:1.23-alpine3.20 AS build-env
ARG GOPROXY
ENV GOPROXY=${GOPROXY:-direct}
ARG GOPROXY=https://proxy.golang.org,direct
ENV GOPROXY=${GOPROXY}
ENV GOPRIVATE=
ENV GONOSUMDB=*
ARG GITEA_VERSION
ARG GITEA_VERSION=deploy_custom
ARG TAGS="sqlite sqlite_unlock_notify"
ENV TAGS="bindata timetzdata $TAGS"
ARG CGO_EXTRA_CFLAGS
# Build deps
RUN apk --no-cache add \
build-base \
git \
nodejs \
npm \
&& rm -rf /var/cache/apk/*
ca-certificates \
&& rm -rf /var/cache/apk/* \
&& update-ca-certificates
RUN npm --version
RUN git config --global http.postBuffer 1048576000 \
&& git config --global http.lowSpeedLimit 0 \
&& git config --global http.lowSpeedTime 999999
COPY go.mod go.sum ./
RUN go mod download
# Setup repo
COPY . ${GOPATH}/src/code.gitea.io/gitea
WORKDIR ${GOPATH}/src/code.gitea.io/gitea
# Checkout version if set
RUN if [ -n "${GITEA_VERSION}" ]; then git checkout "${GITEA_VERSION}"; fi \
&& make clean-all build
RUN if [ -n "${GITEA_VERSION}" ]; then git checkout "${GITEA_VERSION}"; fi
RUN for i in {1..3}; do \
make clean-all build && break || \
(echo "Attempt $i failed, retrying in 5 seconds..." && sleep 5); \
done
# Begin env-to-ini build
RUN go build contrib/environment-to-ini/environment-to-ini.go
# Copy local files
COPY docker/root /tmp/local
# Set permissions
RUN chmod 755 /tmp/local/usr/bin/entrypoint \
/tmp/local/usr/local/bin/gitea \
/tmp/local/etc/s6/gitea/* \