1
0
mirror of https://git.cloudron.io/cloudron/gitea-app synced 2025-09-25 14:37:44 +00:00

Compare commits

..

2 Commits

Author SHA1 Message Date
Vladimir D
22ddd5514d make act_runner re-register on every restart 2025-05-12 13:39:04 +04:00
Vladimir D
626326f65e act_runner implemented 2025-05-12 12:18:58 +04:00
9 changed files with 541 additions and 522 deletions

View File

@@ -1760,101 +1760,3 @@
* Try to fix check-attr bug ([#​34029](https://github.com/go-gitea/gitea/issues/34029)) ([#​34033](https://github.com/go-gitea/gitea/issues/34033))
* Git client will follow 301 but 307 ([#​34005](https://github.com/go-gitea/gitea/issues/34005)) ([#​34010](https://github.com/go-gitea/gitea/issues/34010))
[1.35.4]
* Update gitea to 1.23.8
* [Full Changelog](https://github.com/go-gitea/gitea/releases/tag/v1.23.8)
* Fix a bug when uploading file via lfs ssh command ([#34408](https://github.com/go-gitea/gitea/issues/34408)) ([#34411](https://github.com/go-gitea/gitea/issues/34411))
* Update net package ([#34228](https://github.com/go-gitea/gitea/issues/34228)) ([#34232](https://github.com/go-gitea/gitea/issues/34232))
* Fix releases sidebar navigation link ([#34436](https://github.com/go-gitea/gitea/issues/34436)) [#34439](https://github.com/go-gitea/gitea/issues/34439)
* Fix bug webhook milestone is not right. ([#34419](https://github.com/go-gitea/gitea/issues/34419)) [#34429](https://github.com/go-gitea/gitea/issues/34429)
* Fix two missed null value checks on the wiki page. ([#34205](https://github.com/go-gitea/gitea/issues/34205)) ([#34215](https://github.com/go-gitea/gitea/issues/34215))
* Swift files can be passed either as file or as form value ([#34068](https://github.com/go-gitea/gitea/issues/34068)) ([#34236](https://github.com/go-gitea/gitea/issues/34236))
* Fix bug when API get pull changed files for deleted head repository ([#34333](https://github.com/go-gitea/gitea/issues/34333)) ([#34368](https://github.com/go-gitea/gitea/issues/34368))
* Upgrade github v61 -> v71 to fix migrating bug ([#34389](https://github.com/go-gitea/gitea/issues/34389))
* Fix bug when visiting comparation page ([#34334](https://github.com/go-gitea/gitea/issues/34334)) ([#34364](https://github.com/go-gitea/gitea/issues/34364))
* Fix wrong review requests when updating the pull request ([#34286](https://github.com/go-gitea/gitea/issues/34286)) ([#34304](https://github.com/go-gitea/gitea/issues/34304))
[1.35.5]
* Update gitea to 1.23.8
* [Full Changelog](https://github.com/go-gitea/gitea/releases/tag/v1.23.8)
* Fix a bug when uploading file via lfs ssh command ([#34408](https://github.com/go-gitea/gitea/issues/34408)) ([#34411](https://github.com/go-gitea/gitea/issues/34411))
* Update net package ([#34228](https://github.com/go-gitea/gitea/issues/34228)) ([#34232](https://github.com/go-gitea/gitea/issues/34232))
* Fix releases sidebar navigation link ([#34436](https://github.com/go-gitea/gitea/issues/34436)) [#34439](https://github.com/go-gitea/gitea/issues/34439)
* Fix bug webhook milestone is not right. ([#34419](https://github.com/go-gitea/gitea/issues/34419)) [#34429](https://github.com/go-gitea/gitea/issues/34429)
* Fix two missed null value checks on the wiki page. ([#34205](https://github.com/go-gitea/gitea/issues/34205)) ([#34215](https://github.com/go-gitea/gitea/issues/34215))
* Swift files can be passed either as file or as form value ([#34068](https://github.com/go-gitea/gitea/issues/34068)) ([#34236](https://github.com/go-gitea/gitea/issues/34236))
* Fix bug when API get pull changed files for deleted head repository ([#34333](https://github.com/go-gitea/gitea/issues/34333)) ([#34368](https://github.com/go-gitea/gitea/issues/34368))
* Upgrade github v61 -> v71 to fix migrating bug ([#34389](https://github.com/go-gitea/gitea/issues/34389))
* Fix bug when visiting comparation page ([#34334](https://github.com/go-gitea/gitea/issues/34334)) ([#34364](https://github.com/go-gitea/gitea/issues/34364))
* Fix wrong review requests when updating the pull request ([#34286](https://github.com/go-gitea/gitea/issues/34286)) ([#34304](https://github.com/go-gitea/gitea/issues/34304))
[1.36.0]
* Update gitea to 1.24.0
* [Full Changelog](https://github.com/go-gitea/gitea/releases/tag/v1.24.0)
* Make Gitea always use its internal config, ignore `/etc/gitconfig` ([#33076](https://github.com/go-gitea/gitea/issues/33076))
* Improve log format ([#33814](https://github.com/go-gitea/gitea/issues/33814))
* Fix markdown render behaviors ([#34122](https://github.com/go-gitea/gitea/issues/34122))
* Add package version api endpoints ([#34173](https://github.com/go-gitea/gitea/issues/34173))
* Enforce two-factor auth (2FA: TOTP or WebAuthn) ([#34187](https://github.com/go-gitea/gitea/issues/34187))
* Add fullscreen mode as a more efficient operation way to view projects ([#34081](https://github.com/go-gitea/gitea/issues/34081))
* Add anonymous access support for private/unlisted repositories ([#34051](https://github.com/go-gitea/gitea/issues/34051))
* Support public code/issue access for private repositories ([#33127](https://github.com/go-gitea/gitea/issues/33127))
* Add middleware for request prioritization ([#33951](https://github.com/go-gitea/gitea/issues/33951))
* Add cli flags LDAP group configuration ([#33933](https://github.com/go-gitea/gitea/issues/33933))
[1.36.1]
* Update gitea to 1.24.1
* [Full Changelog](https://github.com/go-gitea/gitea/releases/tag/v1.24.1)
* Improve alignment of commit status icon on commit page ([#​34750](https://github.com/go-gitea/gitea/issues/34750)) ([#​34757](https://github.com/go-gitea/gitea/issues/34757))
* Support title and body query parameters for new MRs ([#​34537](https://github.com/go-gitea/gitea/issues/34537)) ([#​34752](https://github.com/go-gitea/gitea/issues/34752))
* When using rules to delete packages, remove unclean bugs ([#​34632](https://github.com/go-gitea/gitea/issues/34632)) ([#​34761](https://github.com/go-gitea/gitea/issues/34761))
* Fix ghost user in feeds when pushing in an actions, it should be gitea-actions ([#​34703](https://github.com/go-gitea/gitea/issues/34703)) ([#​34756](https://github.com/go-gitea/gitea/issues/34756))
* Prevent double markdown link brackets when pasting URL ([#​34745](https://github.com/go-gitea/gitea/issues/34745)) ([#​34748](https://github.com/go-gitea/gitea/issues/34748))
* Prevent duplicate form submissions when creating forks ([#​34714](https://github.com/go-gitea/gitea/issues/34714)) ([#​34735](https://github.com/go-gitea/gitea/issues/34735))
* Fix markdown wrap ([#​34697](https://github.com/go-gitea/gitea/issues/34697)) ([#​34702](https://github.com/go-gitea/gitea/issues/34702))
* Fix pull requests API convert panic when head repository is deleted. ([#​34685](https://github.com/go-gitea/gitea/issues/34685)) ([#​34687](https://github.com/go-gitea/gitea/issues/34687))
* Fix commit message rendering and some UI problems ([#​34680](https://github.com/go-gitea/gitea/issues/34680)) ([#​34683](https://github.com/go-gitea/gitea/issues/34683))
* Fix container range bug ([#​34725](https://github.com/go-gitea/gitea/issues/34725)) ([#​34732](https://github.com/go-gitea/gitea/issues/34732))
[1.36.2]
* Update gitea to 1.24.2
* [Full Changelog](https://github.com/go-gitea/gitea/releases/tag/v1.24.2)
* Fix container range bug ([#​34795](https://github.com/go-gitea/gitea/issues/34795)) ([#​34796](https://github.com/go-gitea/gitea/issues/34796))
* Upgrade chi to v5.2.2 ([#​34798](https://github.com/go-gitea/gitea/issues/34798)) ([#​34799](https://github.com/go-gitea/gitea/issues/34799))
[1.36.3]
* With Cloudron OIDC, disable registration by default on new installation
* Without Cloudron OIDC, enable registration by default and add checklist item
[1.36.4]
* Update gitea to 1.24.3
* [Full Changelog](https://github.com/go-gitea/gitea/releases/tag/v1.24.3)
* Fix form property assignment edge case ([#​35073](https://github.com/go-gitea/gitea/issues/35073)) ([#​35078](https://github.com/go-gitea/gitea/issues/35078))
* Improve submodule relative path handling ([#​35056](https://github.com/go-gitea/gitea/issues/35056)) ([#​35075](https://github.com/go-gitea/gitea/issues/35075))
* Fix incorrect comment diff hunk parsing, fix github asset ID nil panic ([#​35046](https://github.com/go-gitea/gitea/issues/35046)) ([#​35055](https://github.com/go-gitea/gitea/issues/35055))
* Fix updating user visibility ([#​35036](https://github.com/go-gitea/gitea/issues/35036)) ([#​35044](https://github.com/go-gitea/gitea/issues/35044))
* Support base64-encoded agit push options ([#​35037](https://github.com/go-gitea/gitea/issues/35037)) ([#​35041](https://github.com/go-gitea/gitea/issues/35041))
* Make submodule link work with relative path ([#​35034](https://github.com/go-gitea/gitea/issues/35034)) ([#​35038](https://github.com/go-gitea/gitea/issues/35038))
* Fix bug when displaying git user avatar in commits list ([#​35006](https://github.com/go-gitea/gitea/issues/35006))
* Fix API response for swagger spec ([#​35029](https://github.com/go-gitea/gitea/issues/35029))
* Start automerge check again after the conflict check and the schedule ([#​34988](https://github.com/go-gitea/gitea/issues/34988)) ([#​35002](https://github.com/go-gitea/gitea/issues/35002))
* Fix the response format for actions/workflows ([#​35009](https://github.com/go-gitea/gitea/issues/35009)) ([#​35016](https://github.com/go-gitea/gitea/issues/35016))
[1.36.5]
* Update gitea to 1.24.4
* [Full Changelog](https://github.com/go-gitea/gitea/releases/tag/v1.24.4)
* Fix various bugs (1.24) ([#​35186](https://github.com/go-gitea/gitea/issues/35186))
* Fix migrate input box bug ([#​35166](https://github.com/go-gitea/gitea/issues/35166)) ([#​35171](https://github.com/go-gitea/gitea/issues/35171))
* Only hide dropzone when no files have been uploaded ([#​35156](https://github.com/go-gitea/gitea/issues/35156)) ([#​35167](https://github.com/go-gitea/gitea/issues/35167))
* Fix review comment/dimiss comment x reference can be refereced back ([#​35094](https://github.com/go-gitea/gitea/issues/35094)) ([#​35099](https://github.com/go-gitea/gitea/issues/35099))
* Fix submodule nil check ([#​35096](https://github.com/go-gitea/gitea/issues/35096)) ([#​35098](https://github.com/go-gitea/gitea/issues/35098))
* Don't use full-file highlight when there is a git diff textconv ([#​35114](https://github.com/go-gitea/gitea/issues/35114)) ([#​35119](https://github.com/go-gitea/gitea/issues/35119))
* Increase gap on latest commit ([#​35104](https://github.com/go-gitea/gitea/issues/35104)) ([#​35113](https://github.com/go-gitea/gitea/issues/35113))
[1.36.6]
* Update gitea to 1.24.5
* [Full Changelog](https://github.com/go-gitea/gitea/releases/tag/v1.24.5)
* Fix a bug where lfs gc never worked. (#35198) (#35255)
* Reload issue when sending webhook to make num comments is right. (#35243) (#35248)
* Fix bug when review pull request commits (#35192) (#35246)

View File

@@ -1,15 +1,16 @@
{
"id": "io.gitea.cloudronapp",
"title": "Gitea",
"id": "io.gitea.actrunner.cloudronapp",
"title": "Gitea + Act Runner",
"author": "Gitea developers",
"description": "file://DESCRIPTION.md",
"tagline": "A painless self-hosted Git Service",
"version": "1.36.6",
"upstreamVersion": "1.24.5",
"version": "1.35.3",
"upstreamVersion": "1.23.7",
"healthCheckPath": "/explore",
"httpPort": 3000,
"memoryLimit": 536870912,
"addons": {
"docker": {},
"mysql": {},
"sendmail": {
"supportsDisplayName": true
@@ -52,13 +53,9 @@
"checklist": {
"change-default-password": {
"message": "Change the default admin password"
},
"disable-registration": {
"message": "Disable registration, if required, to prevent misuse",
"sso": false
}
},
"minBoxVersion": "8.1.0",
"forumUrl": "https://forum.cloudron.io/category/19/gitea",
"documentationUrl": "https://docs.cloudron.io/packages/gitea/"
"documentationUrl": "https://docs.cloudron.io/apps/gitea/"
}

View File

@@ -18,7 +18,7 @@ WORKDIR /home/git
ENV GNUPGHOME="/app/data/gnupg"
# renovate: datasource=github-releases depName=go-gitea/gitea versioning=semver extractVersion=^v(?<version>.+)$
ARG GITEA_VERSION=1.24.5
ARG GITEA_VERSION=1.23.7
RUN mkdir -p /home/git/gitea && \
curl -L https://github.com/go-gitea/gitea/releases/download/v${GITEA_VERSION}/gitea-${GITEA_VERSION}-linux-amd64 -o /home/git/gitea/gitea \
@@ -27,14 +27,20 @@ RUN mkdir -p /home/git/gitea && \
# setup config paths
ADD app.ini.template /home/git/app.ini.template
# renovate: datasource=github-releases depName=gitea/act_runner versioning=semver extractVersion=^v(?<version>.+)$ registryUrl=https://gitea.com
ARG ACT_RUNNER_VERSION=0.2.11
RUN curl -L https://gitea.com/gitea/act_runner/releases/download/v${ACT_RUNNER_VERSION}/act_runner-${ACT_RUNNER_VERSION}-linux-amd64.xz | unxz -dc > /usr/local/bin/act_runner && \
chmod +x /usr/local/bin/act_runner
# setup log paths
RUN mkdir -p /run/gitea && chown -R git:git /run/gitea
RUN sed -e 's,^logfile=.*$,logfile=/run/gitea/supervisord.log,' -i /etc/supervisor/supervisord.conf
RUN ln -s /app/data/ssh /home/git/.ssh && \
ln -s /app/data/gitconfig /home/git/.gitconfig
RUN ln -s /app/data/ssh /home/git/.ssh
RUN ln -s /app/data/gitconfig /home/git/.gitconfig
COPY start.sh /home/git/
ADD start.sh /home/git/start.sh
COPY sshd_config /etc/ssh/sshd_config

View File

@@ -7,3 +7,6 @@ This app is pre-setup with an admin account. The initial credentials are:
Use the `Local` authentication source for logging in as admin.
</sso>
Gitea is bundled along with `act_runner` runner. It's being registered in Gitea at the first run.
To configure `act_runner` you need to update `/app/data/act_runner/config.yaml`. Please read a config example for a reference.
https://gitea.com/gitea/act_runner/src/branch/main/internal/pkg/config/config.example.yaml

View File

@@ -75,7 +75,7 @@ REVERSE_PROXY_LIMIT = 1
REVERSE_PROXY_TRUSTED_PROXIES = *
[service]
DISABLE_REGISTRATION = true
DISABLE_REGISTRATION = false
SHOW_REGISTRATION_BUTTON = false
ENABLE_NOTIFY_MAIL = true

View File

@@ -2,7 +2,9 @@
set -eu -o pipefail
mkdir -p /run/gitea/tmp/uploads /run/sshd /run/gitea/sessions
mkdir -p /run/gitea/tmp/uploads /run/sshd /run/gitea/sessions /app/data/act_runner
export DOCKER_HOST=${CLOUDRON_DOCKER_HOST}
# CLOUDRON_OIDC_PROVIDER_NAME not supported as it will be used in rest route!
setup_oidc_source() {
@@ -26,14 +28,38 @@ setup_root_user() {
fi
}
setup_auth() {
set -eu
setup_act_runner() {
wait_for_gitea
# Wait for gitea to finish db setup, before we do any db operations
while ! curl --fail http://localhost:3000/explore; do
echo "==> Setup act_runner"
if [[ ! -f /app/data/act_runner/config.yaml ]]; then
gosu git act_runner generate-config > /app/data/act_runner/config.yaml
fi
yq -e -i ".runner.file=\"/app/data/act_runner/.runner\"" /app/data/act_runner/config.yaml
if [[ ! -f /app/data/act_runner/.runner ]]; then
RUNNER_TOKEN=$(gosu git /home/git/gitea/gitea --config /run/gitea/app.ini actions generate-runner-token)
echo "===> act_runner token: ${RUNNER_TOKEN}"
echo "===> Register act_runner"
gosu git act_runner register --instance ${CLOUDRON_APP_ORIGIN} --token ${RUNNER_TOKEN} --name 'cloudron-runner' --config /app/data/act_runner/config.yaml --no-interactive
else
yq -e -i ".address=\"${CLOUDRON_APP_ORIGIN}\"" /app/data/act_runner/.runner
fi
}
wait_for_gitea() {
while ! curl --fail -s http://localhost:3000/explore > /dev/null; do
echo "==> Waiting for gitea to come up"
sleep 1
done
}
setup() {
set -eu
# Wait for gitea to finish db setup, before we do any db operations
wait_for_gitea
echo "==> Gitea is up, setting up auth"
@@ -47,6 +73,9 @@ setup_auth() {
echo "==> Setting up root user for first run"
setup_root_user
fi
# setup act_runner
setup_act_runner
}
# SSH_PORT can be unset to disable SSH
@@ -78,11 +107,6 @@ if [[ ! -f /app/data/app.ini ]]; then
echo "==> Generating new SECRET_KEY"
crudini --set "/app/data/app.ini" security SECRET_KEY $(pwgen -1 -s)
if [[ -z "${CLOUDRON_OIDC_ISSUER:-}" ]]; then
crudini --set "/app/data/app.ini" service DISABLE_REGISTRATION false
crudini --set "/app/data/app.ini" service SHOW_REGISTRATION_BUTTON true
fi
fi
# merge user config file
@@ -125,6 +149,6 @@ mkdir -p /app/data/repository /app/data/ssh /app/data/custom /app/data/gnupg
chown -R git:git /app/data /run/gitea
# this expects app.ini to be available
( setup_auth ) &
( setup ) &
exec /usr/bin/supervisord --configuration /etc/supervisor/supervisord.conf --nodaemon -i Gitea

View File

@@ -0,0 +1,11 @@
[program:act_runner]
directory=/app/data/act_runner/
command=bash -c "while true; do [[ -f /app/data/act_runner/.runner ]] && break; echo 'Wait for act_runner config'; sleep 1; done && act_runner daemon --config /app/data/act_runner/config.yaml"
user=git
autostart=true
autorestart=true
stdout_logfile=/dev/stdout
stdout_logfile_maxbytes=0
stderr_logfile=/dev/stderr
stderr_logfile_maxbytes=0
environment=HOME="/home/git",USER="git"

866
test/package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@@ -9,10 +9,10 @@
"author": "",
"license": "ISC",
"dependencies": {
"chromedriver": "^139.0.1",
"chromedriver": "^135.0.0",
"expect.js": "^0.3.1",
"mocha": "^11.7.1",
"selenium-webdriver": "^4.35.0",
"superagent": "^10.2.3"
"mocha": "^11.1.0",
"selenium-webdriver": "^4.31.0",
"superagent": "^10.2.0"
}
}