mirror of
https://github.com/go-gitea/gitea
synced 2025-08-10 11:38:20 +00:00
Add protection to disable Gitea when run as root (#17168)
Co-authored-by: delvh <dev.lh@web.de> Co-authored-by: 6543 <6543@obermui.de>
This commit is contained in:
24
.drone.yml
24
.drone.yml
@@ -207,8 +207,14 @@ steps:
|
||||
commands:
|
||||
- git update-ref refs/heads/tag_test ${DRONE_COMMIT_SHA}
|
||||
|
||||
- name: fix-permissions
|
||||
image: gitea/test_env:linux-amd64 # https://gitea.com/gitea/test-env
|
||||
commands:
|
||||
- chown -R gitea:gitea .
|
||||
|
||||
- name: unit-test
|
||||
image: golang:1.17
|
||||
image: gitea/test_env:linux-amd64 # https://gitea.com/gitea/test-env
|
||||
user: gitea
|
||||
commands:
|
||||
- make unit-test-coverage test-check
|
||||
environment:
|
||||
@@ -220,7 +226,8 @@ steps:
|
||||
|
||||
- name: unit-test-gogit
|
||||
pull: always
|
||||
image: golang:1.17
|
||||
image: gitea/test_env:linux-amd64 # https://gitea.com/gitea/test-env
|
||||
user: gitea
|
||||
commands:
|
||||
- make unit-test-coverage test-check
|
||||
environment:
|
||||
@@ -232,6 +239,7 @@ steps:
|
||||
|
||||
- name: test-mysql
|
||||
image: gitea/test_env:linux-amd64 # https://gitea.com/gitea/test-env
|
||||
user: gitea
|
||||
commands:
|
||||
- make test-mysql-migration integration-test-coverage
|
||||
environment:
|
||||
@@ -246,6 +254,7 @@ steps:
|
||||
|
||||
- name: test-mysql8
|
||||
image: gitea/test_env:linux-amd64 # https://gitea.com/gitea/test-env
|
||||
user: gitea
|
||||
commands:
|
||||
- timeout -s ABRT 40m make test-mysql8-migration test-mysql8
|
||||
environment:
|
||||
@@ -259,6 +268,7 @@ steps:
|
||||
|
||||
- name: test-mssql
|
||||
image: gitea/test_env:linux-amd64 # https://gitea.com/gitea/test-env
|
||||
user: gitea
|
||||
commands:
|
||||
- make test-mssql-migration test-mssql
|
||||
environment:
|
||||
@@ -343,9 +353,15 @@ steps:
|
||||
exclude:
|
||||
- pull_request
|
||||
|
||||
- name: fix-permissions
|
||||
image: gitea/test_env:linux-arm64 # https://gitea.com/gitea/test-env
|
||||
commands:
|
||||
- chown -R gitea:gitea .
|
||||
|
||||
- name: build
|
||||
pull: always
|
||||
image: golang:1.17
|
||||
image: gitea/test_env:linux-arm64 # https://gitea.com/gitea/test-env
|
||||
user: gitea
|
||||
commands:
|
||||
- make backend
|
||||
environment:
|
||||
@@ -355,6 +371,7 @@ steps:
|
||||
|
||||
- name: test-sqlite
|
||||
image: gitea/test_env:linux-arm64 # https://gitea.com/gitea/test-env
|
||||
user: gitea
|
||||
commands:
|
||||
- timeout -s ABRT 40m make test-sqlite-migration test-sqlite
|
||||
environment:
|
||||
@@ -368,6 +385,7 @@ steps:
|
||||
|
||||
- name: test-pgsql
|
||||
image: gitea/test_env:linux-arm64 # https://gitea.com/gitea/test-env
|
||||
user: gitea
|
||||
commands:
|
||||
- timeout -s ABRT 40m make test-pgsql-migration test-pgsql
|
||||
environment:
|
||||
|
Reference in New Issue
Block a user