1
0
mirror of https://git.cloudron.io/cloudron/gitea-app synced 2025-09-24 14:07:45 +00:00

Compare commits

...

11 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
Package Updates
d0d4b89f12 Update package version to 1.35.3 2025-04-08 09:27:03 +00:00
Renovate Bot
16253c0192 chore(deps): update dependency go-gitea/gitea to v1.23.7
| datasource      | package        | from   | to     |
| --------------- | -------------- | ------ | ------ |
| github-releases | go-gitea/gitea | 1.23.6 | 1.23.7 |
2025-04-08 07:45:24 +00:00
Package Updates
c9ba138d8a Update package version to 1.35.2 2025-03-25 07:58:30 +00:00
Renovate Bot
7337ff8517 chore(deps): update dependency go-gitea/gitea to v1.23.6
| datasource      | package        | from   | to     |
| --------------- | -------------- | ------ | ------ |
| github-releases | go-gitea/gitea | 1.23.5 | 1.23.6 |
2025-03-25 07:13:13 +00:00
Package Updates
94f2007015 Update package version to 1.35.1 2025-03-21 12:09:25 +00:00
Ian Fijolek
1110ee23e2 And port number 2025-03-21 12:51:33 +01:00
Ian Fijolek
ccaa24df33 Found another location 2025-03-20 19:33:57 +00:00
Ian Fijolek
9c4f201845 Fix hard coded mysql hostname 2025-03-20 19:31:55 +00:00
Package Updates
2f0edb0cb4 Update package version to 1.35.0 2025-03-05 15:36:24 +00:00
8 changed files with 120 additions and 37 deletions

View File

@@ -1728,3 +1728,35 @@
* Fix mCaptcha bug (#33659) (#33661)
* Git graph: don't show detached commits (#33645) (#33650)
[1.35.0]
* Base image 5
[1.35.1]
* Fix hard coded mysql hostname
[1.35.2]
* Update gitea to 1.23.6
* [Full Changelog](https://github.com/go-gitea/gitea/releases/tag/v1.23.6)
* Fix LFS URL (#33840) (#33843)
* Update jwt and redis packages (#33984) (#33987)
* Update golang crypto and net (#33989)
* Drop timeout for requests made to the internal hook api (#33947) (#33970)
* Fix maven panic when no package exists (#33888) (#33889)
* Fix markdown render (#33870) (#33875)
* Fix auto concurrency cancellation skips commit status updates (#33764) (#33849)
* Fix oauth2 auth (#33961) (#33962)
[1.35.3]
* Update gitea to 1.23.7
* [Full Changelog](https://github.com/go-gitea/gitea/releases/tag/v1.23.7)
* Compile with Go 1.23.8
* Add a config option to block "expensive" pages for anonymous users ([#​34024](https://github.com/go-gitea/gitea/issues/34024)) ([#​34071](https://github.com/go-gitea/gitea/issues/34071))
* Also check default ssh-cert location for host ([#​34099](https://github.com/go-gitea/gitea/issues/34099)) ([#​34100](https://github.com/go-gitea/gitea/issues/34100)) ([#​34116](https://github.com/go-gitea/gitea/issues/34116))
* Fix discord webhook 400 status code when description limit is exceeded ([#​34084](https://github.com/go-gitea/gitea/issues/34084)) ([#​34124](https://github.com/go-gitea/gitea/issues/34124))
* Get changed files based on merge base when checking `pull_request` actions trigger ([#​34106](https://github.com/go-gitea/gitea/issues/34106)) ([#​34120](https://github.com/go-gitea/gitea/issues/34120))
* Fix invalid version in RPM package path ([#​34112](https://github.com/go-gitea/gitea/issues/34112)) ([#​34115](https://github.com/go-gitea/gitea/issues/34115))
* Return default avatar url when user id is zero rather than updating database ([#​34094](https://github.com/go-gitea/gitea/issues/34094)) ([#​34095](https://github.com/go-gitea/gitea/issues/34095))
* Add additional ReplaceAll in pathsep to cater for different pathsep ([#​34061](https://github.com/go-gitea/gitea/issues/34061)) ([#​34070](https://github.com/go-gitea/gitea/issues/34070))
* 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))

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.34.4",
"upstreamVersion": "1.23.5",
"version": "1.35.3",
"upstreamVersion": "1.23.7",
"healthCheckPath": "/explore",
"httpPort": 3000,
"memoryLimit": 536870912,
"addons": {
"docker": {},
"mysql": {},
"sendmail": {
"supportsDisplayName": true

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.23.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,6 +27,12 @@ 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

View File

@@ -6,3 +6,7 @@ This app is pre-setup with an admin account. The initial credentials are:
<sso>
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

@@ -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() {
@@ -11,7 +13,7 @@ setup_oidc_source() {
echo "==> Setup OIDC source"
now=$(date +%s)
mysql -u"${CLOUDRON_MYSQL_USERNAME}" -p"${CLOUDRON_MYSQL_PASSWORD}" -h mysql --database="${CLOUDRON_MYSQL_DATABASE}" -e \
mysql -u"${CLOUDRON_MYSQL_USERNAME}" -p"${CLOUDRON_MYSQL_PASSWORD}" -h"${CLOUDRON_MYSQL_HOST}" -P"${CLOUDRON_MYSQL_PORT}" --database="${CLOUDRON_MYSQL_DATABASE}" -e \
"REPLACE INTO login_source (id, type, name, is_active, cfg, created_unix, updated_unix) VALUES (1,6,'cloudron', 1,'{\"Provider\":\"openidConnect\",\"ClientID\":\"${CLOUDRON_OIDC_CLIENT_ID}\",\"ClientSecret\":\"${CLOUDRON_OIDC_CLIENT_SECRET}\",\"OpenIDConnectAutoDiscoveryURL\":\"${CLOUDRON_OIDC_ISSUER}/.well-known/openid-configuration\",\"CustomURLMapping\":null,\"IconURL\":\"\",\"Scopes\":[\"openid email profile\"],\"RequiredClaimName\":\"\",\"RequiredClaimValue\":\"\",\"GroupClaimName\":\"\",\"AdminGroup\":\"\",\"GroupTeamMap\":\"\",\"GroupTeamMapRemoval\":false,\"RestrictedGroup\":\"\"}','${now}','${now}')"
}
@@ -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"
@@ -41,12 +67,15 @@ setup_auth() {
setup_oidc_source
fi
user_count=$(mysql -u"${CLOUDRON_MYSQL_USERNAME}" -p"${CLOUDRON_MYSQL_PASSWORD}" -h mysql --database="${CLOUDRON_MYSQL_DATABASE}" -N -B -e "SELECT count(*) FROM user")
user_count=$(mysql -u"${CLOUDRON_MYSQL_USERNAME}" -p"${CLOUDRON_MYSQL_PASSWORD}" -h"${CLOUDRON_MYSQL_HOST}" -P"${CLOUDRON_MYSQL_PORT}" --database="${CLOUDRON_MYSQL_DATABASE}" -N -B -e "SELECT count(*) FROM user")
# be careful, not to create root user for existing LDAP based installs
if [[ "${user_count}" == "0" ]]; then
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
@@ -120,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"

42
test/package-lock.json generated
View File

@@ -9,11 +9,11 @@
"version": "1.0.0",
"license": "ISC",
"dependencies": {
"chromedriver": "^133.0.3",
"chromedriver": "^135.0.0",
"expect.js": "^0.3.1",
"mocha": "^11.1.0",
"selenium-webdriver": "^4.29.0",
"superagent": "^10.1.1"
"selenium-webdriver": "^4.31.0",
"superagent": "^10.2.0"
}
},
"node_modules/@bazel/runfiles": {
@@ -380,9 +380,9 @@
}
},
"node_modules/chromedriver": {
"version": "133.0.3",
"resolved": "https://registry.npmjs.org/chromedriver/-/chromedriver-133.0.3.tgz",
"integrity": "sha512-wGZUtrSdyqnbweXEDIbn+ndu7memG4SEqG6/D+mSabKUEic0hveMYepAPAhlYtvyOc0X8JbsARYtEalVD3R/Vg==",
"version": "135.0.0",
"resolved": "https://registry.npmjs.org/chromedriver/-/chromedriver-135.0.0.tgz",
"integrity": "sha512-ilE3cIrIieiRU/a6MNpt0CL0UZs2tu0lQAes+el5SV03MB1zYIEXy+dDeueid/g8AmT1loy7TB2fjWwcHLY8lg==",
"hasInstallScript": true,
"license": "Apache-2.0",
"dependencies": {
@@ -1654,9 +1654,9 @@
]
},
"node_modules/selenium-webdriver": {
"version": "4.29.0",
"resolved": "https://registry.npmjs.org/selenium-webdriver/-/selenium-webdriver-4.29.0.tgz",
"integrity": "sha512-8XPGtDoji5xk7ZUCzFT1rqHmCp67DCzESsttId7DzmrJmlTRmRLF6X918rbwclcH89amcBNM4zB3lVPj404I0g==",
"version": "4.31.0",
"resolved": "https://registry.npmjs.org/selenium-webdriver/-/selenium-webdriver-4.31.0.tgz",
"integrity": "sha512-0MWEwypM0+c1NnZ87UEMxZdwphKoaK2UJ2qXzKWrJiM0gazFjgNVimxlHTOO90G2cOhphZqwpqSCJy62NTEzyA==",
"funding": [
{
"type": "github",
@@ -1883,9 +1883,9 @@
}
},
"node_modules/superagent": {
"version": "10.1.1",
"resolved": "https://registry.npmjs.org/superagent/-/superagent-10.1.1.tgz",
"integrity": "sha512-9pIwrHrOj3uAnqg9gDlW7EA2xv+N5au/dSM0kM22HTqmUu8jBxNT+8uA7tA3UoCnmiqzpSbu8rasIUZvbyamMQ==",
"version": "10.2.0",
"resolved": "https://registry.npmjs.org/superagent/-/superagent-10.2.0.tgz",
"integrity": "sha512-IKeoGox6oG9zyDeizaezkJ2/aK0wc5la9st7WsAKyrAkfJ56W3whVbVtF68k6wuc87/y9T85NyON5FLz7Mrzzw==",
"license": "MIT",
"dependencies": {
"component-emitter": "^1.3.0",
@@ -2385,9 +2385,9 @@
}
},
"chromedriver": {
"version": "133.0.3",
"resolved": "https://registry.npmjs.org/chromedriver/-/chromedriver-133.0.3.tgz",
"integrity": "sha512-wGZUtrSdyqnbweXEDIbn+ndu7memG4SEqG6/D+mSabKUEic0hveMYepAPAhlYtvyOc0X8JbsARYtEalVD3R/Vg==",
"version": "135.0.0",
"resolved": "https://registry.npmjs.org/chromedriver/-/chromedriver-135.0.0.tgz",
"integrity": "sha512-ilE3cIrIieiRU/a6MNpt0CL0UZs2tu0lQAes+el5SV03MB1zYIEXy+dDeueid/g8AmT1loy7TB2fjWwcHLY8lg==",
"requires": {
"@testim/chrome-version": "^1.1.4",
"axios": "^1.7.4",
@@ -3269,9 +3269,9 @@
"integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ=="
},
"selenium-webdriver": {
"version": "4.29.0",
"resolved": "https://registry.npmjs.org/selenium-webdriver/-/selenium-webdriver-4.29.0.tgz",
"integrity": "sha512-8XPGtDoji5xk7ZUCzFT1rqHmCp67DCzESsttId7DzmrJmlTRmRLF6X918rbwclcH89amcBNM4zB3lVPj404I0g==",
"version": "4.31.0",
"resolved": "https://registry.npmjs.org/selenium-webdriver/-/selenium-webdriver-4.31.0.tgz",
"integrity": "sha512-0MWEwypM0+c1NnZ87UEMxZdwphKoaK2UJ2qXzKWrJiM0gazFjgNVimxlHTOO90G2cOhphZqwpqSCJy62NTEzyA==",
"requires": {
"@bazel/runfiles": "^6.3.1",
"jszip": "^3.10.1",
@@ -3426,9 +3426,9 @@
"integrity": "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig=="
},
"superagent": {
"version": "10.1.1",
"resolved": "https://registry.npmjs.org/superagent/-/superagent-10.1.1.tgz",
"integrity": "sha512-9pIwrHrOj3uAnqg9gDlW7EA2xv+N5au/dSM0kM22HTqmUu8jBxNT+8uA7tA3UoCnmiqzpSbu8rasIUZvbyamMQ==",
"version": "10.2.0",
"resolved": "https://registry.npmjs.org/superagent/-/superagent-10.2.0.tgz",
"integrity": "sha512-IKeoGox6oG9zyDeizaezkJ2/aK0wc5la9st7WsAKyrAkfJ56W3whVbVtF68k6wuc87/y9T85NyON5FLz7Mrzzw==",
"requires": {
"component-emitter": "^1.3.0",
"cookiejar": "^2.1.4",

View File

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