mirror of
https://github.com/nextcloud/all-in-one.git
synced 2026-02-04 04:56:52 +00:00
Compare commits
15 commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
9c0334d3f0 | ||
|
|
e95f5cc590 | ||
|
|
b8f594b09a | ||
|
|
9c0c55dc7e | ||
|
|
c84416df5d | ||
|
|
cfff44954b | ||
|
|
733330fd1d | ||
|
|
06090a2677 | ||
|
|
4eb45ebfdb | ||
|
|
82cbbe1829 | ||
|
|
cba66dec0b | ||
|
|
88b2121eaa | ||
|
|
4ecb870885 | ||
|
|
dae8102088 | ||
|
|
b1cea36dfa |
5 changed files with 56 additions and 3 deletions
50
.github/workflows/fail-on-prerelease.yml
vendored
Normal file
50
.github/workflows/fail-on-prerelease.yml
vendored
Normal file
|
|
@ -0,0 +1,50 @@
|
||||||
|
name: Block if prerelease is present
|
||||||
|
|
||||||
|
on:
|
||||||
|
pull_request:
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
check-latest-release:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: "Check latest published release isn't a prerelease"
|
||||||
|
uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v6
|
||||||
|
with:
|
||||||
|
script: |
|
||||||
|
const tags = await github.rest.repos.listTags({
|
||||||
|
owner: context.repo.owner,
|
||||||
|
repo: context.repo.repo,
|
||||||
|
per_page: 1
|
||||||
|
});
|
||||||
|
|
||||||
|
if (!tags.data || tags.data.length === 0) {
|
||||||
|
core.info('No tags found for this repository; skipping prerelease check.');
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
const latestTag = tags.data[0].name;
|
||||||
|
core.info(`Latest tag found: ${latestTag}`);
|
||||||
|
|
||||||
|
try {
|
||||||
|
const { data } = await github.rest.repos.getReleaseByTag({
|
||||||
|
owner: context.repo.owner,
|
||||||
|
repo: context.repo.repo,
|
||||||
|
tag: latestTag
|
||||||
|
});
|
||||||
|
|
||||||
|
if (data.prerelease) {
|
||||||
|
core.setFailed(`Release for tag ${latestTag} (${data.tag_name}) is a prerelease. Blocking merges to main as we need to wait for the prerelease to become stable.`);
|
||||||
|
} else {
|
||||||
|
core.info(`Release for tag ${latestTag} (${data.tag_name}) is not a prerelease.`);
|
||||||
|
}
|
||||||
|
|
||||||
|
} catch (err) {
|
||||||
|
if (err.status === 404) {
|
||||||
|
core.info(`No release found for tag ${latestTag}; skipping prerelease check.`);
|
||||||
|
} else {
|
||||||
|
throw err;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -4,7 +4,7 @@ echo "Daily backup script has started"
|
||||||
|
|
||||||
# Check if initial configuration has been done, otherwise this script should do nothing.
|
# Check if initial configuration has been done, otherwise this script should do nothing.
|
||||||
CONFIG_FILE=/mnt/docker-aio-config/data/configuration.json
|
CONFIG_FILE=/mnt/docker-aio-config/data/configuration.json
|
||||||
if ! [ -f "$CONFIG_FILE" ] || ! grep -q "wasStartButtonClicked.*1" "$CONFIG_FILE"; then
|
if ! [ -f "$CONFIG_FILE" ] || (! grep -q "wasStartButtonClicked.*1" "$CONFIG_FILE" && ! grep -q "wasStartButtonClicked.*true" "$CONFIG_FILE"); then
|
||||||
echo "Initial configuration via AIO interface not done yet. Exiting..."
|
echo "Initial configuration via AIO interface not done yet. Exiting..."
|
||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
|
|
|
||||||
|
|
@ -50,7 +50,7 @@
|
||||||
"nextcloud_exec_commands": [
|
"nextcloud_exec_commands": [
|
||||||
"php /var/www/html/occ app:install integration_openai",
|
"php /var/www/html/occ app:install integration_openai",
|
||||||
"php /var/www/html/occ app:enable integration_openai",
|
"php /var/www/html/occ app:enable integration_openai",
|
||||||
"php /var/www/html/occ config:app:set integration_openai url --value http://nextcloud-aio-local-ai:8080",
|
"php /var/www/html/occ config:app:set integration_openai url --value http://nextcloud-aio-local-ai:10078",
|
||||||
"php /var/www/html/occ config:app:set integration_openai api_key --value %LOCALAI_API_KEY%",
|
"php /var/www/html/occ config:app:set integration_openai api_key --value %LOCALAI_API_KEY%",
|
||||||
"php /var/www/html/occ app:install assistant",
|
"php /var/www/html/occ app:install assistant",
|
||||||
"php /var/www/html/occ app:enable assistant"
|
"php /var/www/html/occ app:enable assistant"
|
||||||
|
|
|
||||||
|
|
@ -17,6 +17,7 @@ readonly class ConfigurationController {
|
||||||
|
|
||||||
public function SetConfig(Request $request, Response $response, array $args): Response {
|
public function SetConfig(Request $request, Response $response, array $args): Response {
|
||||||
try {
|
try {
|
||||||
|
$this->configurationManager->startTransaction();
|
||||||
if (isset($request->getParsedBody()['domain'])) {
|
if (isset($request->getParsedBody()['domain'])) {
|
||||||
$domain = $request->getParsedBody()['domain'] ?? '';
|
$domain = $request->getParsedBody()['domain'] ?? '';
|
||||||
$skipDomainValidation = isset($request->getParsedBody()['skip_domain_validation']);
|
$skipDomainValidation = isset($request->getParsedBody()['skip_domain_validation']);
|
||||||
|
|
@ -137,6 +138,8 @@ readonly class ConfigurationController {
|
||||||
} catch (InvalidSettingConfigurationException $ex) {
|
} catch (InvalidSettingConfigurationException $ex) {
|
||||||
$response->getBody()->write($ex->getMessage());
|
$response->getBody()->write($ex->getMessage());
|
||||||
return $response->withStatus(422);
|
return $response->withStatus(422);
|
||||||
|
} finally {
|
||||||
|
$this->configurationManager->commitTransaction();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1 +1 @@
|
||||||
12.6.0
|
12.6.1
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue