Compare commits

..

11 Commits

Author SHA1 Message Date
d564dc0ecb Update CHANGELOG.md (#2634)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2025-02-25 12:38:57 +01:00
cb462dcb39 Update add-tailscale-lxc.sh (#2633) 2025-02-25 11:41:08 +01:00
3401b76c44 Updated Changelog Workflow (#2632) 2025-02-25 11:27:31 +01:00
599a518cc3 Update CHANGELOG.md (#2631)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2025-02-25 09:27:14 +01:00
59223628af Update Tailscale-lxc Json: Add message for Supported OS (#2629)
* Update add-tailscale-lxc.json

* Update json/add-tailscale-lxc.json

Co-authored-by: Slaviša Arežina <58952836+tremor021@users.noreply.github.com>

* Update json/add-tailscale-lxc.json

Co-authored-by: Slaviša Arežina <58952836+tremor021@users.noreply.github.com>

---------

Co-authored-by: Slaviša Arežina <58952836+tremor021@users.noreply.github.com>
2025-02-25 09:20:41 +01:00
029332fb51 Revert "[gh] Update Changelog Workflow (#2621)" (#2630)
This reverts commit 893bff1b59.
2025-02-25 09:20:09 +01:00
aba73bd0f8 Update CHANGELOG.md (#2628)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2025-02-25 09:00:28 +01:00
893bff1b59 [gh] Update Changelog Workflow (#2621)
* Update Workflow

* Update Workflow
2025-02-25 08:55:17 +01:00
bef3ccd164 Update omada.sh 2025-02-25 08:46:18 +01:00
02fb3ab9b4 Update omada-install.sh 2025-02-25 08:44:53 +01:00
87c17fc16d Downgrade mongodb to v7.0 when installing Omada controller (#2625) 2025-02-25 08:42:48 +01:00
9 changed files with 136 additions and 61 deletions

View File

@ -7,14 +7,27 @@
"title": "🆕 New Scripts",
"labels": ["new script"]
},
{
"title": "🐞 Bug Fixes",
"labels": ["bugfix"]
},
{
"title": "✨ New Features",
"labels": ["feature"]
},
{
"title": "🚀 Updated Scripts",
"labels": ["update script"],
"subCategories": [
{
"title": "🐞 Bug Fixes",
"labels": ["bugfix"],
"notes" : []
},
{
"title": "General Updates",
"labels": ["general"],
"notes" : []
}
]
},
{
"title": "🌐 Website",
"labels": ["website"]

View File

@ -32,7 +32,7 @@ jobs:
const autolabelerConfig = JSON.parse(fileContent);
const prNumber = context.payload.pull_request.number;
const prBody = context.payload.pull_request.body;
const prBody = context.payload.pull_request.body.toLowerCase();
let labelsToAdd = new Set();
@ -43,6 +43,27 @@ jobs:
});
const prFiles = prListFilesResponse.data;
const templateLabelMappings = {
"🐞 **bug fix**": "bugfix",
"✨ **new feature**": "feature",
"💥 **breaking change**": "breaking change",
"🆕 **new script**": "new script"
};
for (const [checkbox, label] of Object.entries(templateLabelMappings)) {
const escapedCheckbox = checkbox.replace(/([.*+?^=!:${}()|\[\]\/\\])/g, "\\$1");
const regex = new RegExp(`- \\[(x|X)\\]\\s*.*${escapedCheckbox}`, "i");
const match = prBody.match(regex);
if (match) {
console.log(`Match: ${match}`);
labelsToAdd.add(label);
}
}
if (labelsToAdd.size === 0) {
labelsToAdd.add("general");
}
// Apply labels based on file changes
for (const [label, rules] of Object.entries(autolabelerConfig)) {
const shouldAddLabel = prFiles.some((prFile) => {
return rules.some((rule) => {
@ -59,20 +80,6 @@ jobs:
}
}
const templateLabelMappings = {
"🐞 bug fix": "bugfix",
"✨ new feature": "feature",
"💥 breaking change": "breaking change",
"🆕 new script": "new script"
};
for (const [checkbox, label] of Object.entries(templateLabelMappings)) {
const regex = new RegExp(`- \\[x\\] ${checkbox}`, "i"); // Match only checked checkboxes
if (regex.test(prBody)) {
labelsToAdd.add(label);
}
}
console.log(`Labels to add: ${Array.from(labelsToAdd).join(", ")}`);
if (labelsToAdd.size > 0) {

View File

@ -30,7 +30,6 @@ jobs:
- name: Get latest dates in changelog
run: |
# Extrahiere die neuesten zwei Daten aus dem Changelog
DATES=$(grep -E '^## [0-9]{4}-[0-9]{2}-[0-9]{2}' CHANGELOG.md | head -n 2 | awk '{print $2}')
LATEST_DATE=$(echo "$DATES" | sed -n '1p')
@ -55,7 +54,15 @@ jobs:
const configPath = path.resolve(process.env.CONFIG_PATH);
const fileContent = await fs.readFile(configPath, 'utf-8');
const changelogConfig = JSON.parse(fileContent);
const categorizedPRs = changelogConfig.map(obj => ({ ...obj, notes: [] }));
const categorizedPRs = changelogConfig.map(obj => ({
...obj,
notes: [],
subCategories: obj.subCategories ?? (obj.labels.includes("update script") ? [
{ title: "🐞 Bug Fixes", labels: ["bugfix"] },
{ title: "✨ Feature Updates", labels: ["feature"] }
] : [])
}));
const latestDateInChangelog = new Date(process.env.LATEST_DATE);
latestDateInChangelog.setUTCHours(23, 59, 59, 999);
@ -73,38 +80,34 @@ jobs:
pulls.filter(pr =>
pr.merged_at &&
new Date(pr.merged_at) > latestDateInChangelog &&
!pr.labels.some(label => ["invalid", "wontdo", process.env.AUTOMATED_PR_LABEL].includes(label.name.toLowerCase()))
!pr.labels.some(label =>
["invalid", "wontdo", process.env.AUTOMATED_PR_LABEL].includes(label.name.toLowerCase())
)
).forEach(pr => {
const prLabels = pr.labels.map(label => label.name.toLowerCase());
const prNote = `- ${pr.title} [@${pr.user.login}](https://github.com/${pr.user.login}) ([#${pr.number}](${pr.html_url}))`;
let isCategorized = false;
const updateScriptsCategory = categorizedPRs.find(category =>
category.labels.some(label => prLabels.includes(label))
);
for (const { labels, notes } of categorizedPRs) {
// If no labels are specified (e.g., "Unlabelled"), assign to this category
if (labels.length === 0 && prLabels.length === 0) {
notes.push(prNote);
isCategorized = true;
break;
}
if (updateScriptsCategory) {
// If labels are specified, check if PR has ALL required labels
if (labels.length > 0 && labels.every(label => prLabels.includes(label.toLowerCase()))) {
notes.push(prNote);
isCategorized = true;
break;
}
}
const subCategory = updateScriptsCategory.subCategories.find(sub =>
sub.labels.some(label => prLabels.includes(label))
);
// If PR is not categorized, assign it to the "Unlabelled" category
if (!isCategorized) {
const unlabelledCategory = categorizedPRs.find(cat => cat.title === "❔ Unlabelled");
if (unlabelledCategory) {
unlabelledCategory.notes.push(prNote);
if (subCategory) {
subCategory.notes.push(prNote);
} else {
updateScriptsCategory.notes.push(prNote);
}
}
});
console.log(JSON.stringify(categorizedPRs, null, 2));
return categorizedPRs;
- name: Update CHANGELOG.md
@ -119,10 +122,30 @@ jobs:
const changelogPath = path.resolve('CHANGELOG.md');
const categorizedPRs = ${{ steps.get-categorized-prs.outputs.result }};
console.log(JSON.stringify(categorizedPRs, null, 2));
let newReleaseNotes = `## ${today}\n\n### Changes\n\n`;
for (const { title, notes } of categorizedPRs) {
if (notes.length > 0) {
newReleaseNotes += `### ${title}\n\n${notes.join("\n")}\n\n`;
for (const { title, notes, subCategories } of categorizedPRs) {
const hasSubcategories = subCategories && subCategories.length > 0;
const hasMainNotes = notes.length > 0;
const hasSubNotes = hasSubcategories && subCategories.some(sub => sub.notes && sub.notes.length > 0);
if (hasMainNotes || hasSubNotes) {
newReleaseNotes += `### ${title}\n\n`;
}
if (hasMainNotes) {
newReleaseNotes += `${notes.join("\n")}\n\n`;
}
if (hasSubcategories) {
for (const { title: subTitle, notes: subNotes } of subCategories) {
if (subNotes && subNotes.length > 0) {
newReleaseNotes += ` #### ${subTitle}\n\n`;
newReleaseNotes += ` ${subNotes.join("\n ")}\n\n`;
}
}
}
}

View File

@ -17,6 +17,28 @@ All LXC instances created using this repository come pre-installed with Midnight
Do not break established syntax in this file, as it is automatically updated by a Github Workflow
## 2025-02-25
### Changes
### ✨ New Features
- Update Tailscale: Add Tag when installation is finished [@michelroegl-brunner](https://github.com/michelroegl-brunner) ([#2633](https://github.com/community-scripts/ProxmoxVE/pull/2633))
### 🚀 Updated Scripts
#### 🐞 Bug Fixes
- Fix Omada installer [@JcMinarro](https://github.com/JcMinarro) ([#2625](https://github.com/community-scripts/ProxmoxVE/pull/2625))
### 🌐 Website
- Update Tailscale-lxc Json: Add message for Supported OS [@michelroegl-brunner](https://github.com/michelroegl-brunner) ([#2629](https://github.com/community-scripts/ProxmoxVE/pull/2629))
### 🧰 Maintenance
- [gh] Updated Changelog Workflow [@michelroegl-brunner](https://github.com/michelroegl-brunner) ([#2632](https://github.com/community-scripts/ProxmoxVE/pull/2632))
## 2025-02-24
### Changes

View File

@ -29,9 +29,11 @@ function update_script() {
fi
msg_info "Updating MongoDB"
MONGODB_VERSION="8.0"
MONGODB_VERSION="7.0"
if ! lscpu | grep -q 'avx'; then
MONGODB_VERSION="4.4"
msg_error "No AVX detected: TP-Link Canceled Support for Old MongoDB for Debian 12\n https://www.tp-link.com/baltic/support/faq/4160/"
exit 1
fi
wget -qO- https://www.mongodb.org/static/pgp/server-${MONGODB_VERSION}.asc | gpg --dearmor >/usr/share/keyrings/mongodb-server-${MONGODB_VERSION}.gpg

View File

@ -20,12 +20,13 @@ msg_ok "Installed Dependencies"
msg_info "Checking CPU Features"
if lscpu | grep -q 'avx'; then
USE_AVX=true
MONGODB_VERSION="8.0"
msg_ok "AVX detected: Using MongoDB 8.0"
MONGODB_VERSION="7.0"
msg_ok "AVX detected: Using MongoDB 7.0"
else
USE_AVX=false
MONGODB_VERSION="4.4"
msg_ok "No AVX detected: Using MongoDB 4.4"
msg_error "No AVX detected: TP-Link Canceled Support for Old MongoDB for Debian 12\n https://www.tp-link.com/baltic/support/faq/4160/"
exit 1
fi
msg_info "Installing Azul Zulu Java"

View File

@ -31,6 +31,10 @@
"password": null
},
"notes": [
{
"text": "Only supported on Debian 12 LXCs",
"type": "warning"
},
{
"text": "After the script finishes, reboot the LXC then run `tailscale up` in the LXC console",
"type": "info"

View File

@ -67,6 +67,9 @@ echo "deb [signed-by=/usr/share/keyrings/tailscale-archive-keyring.gpg] https://
apt-get update &>/dev/null
apt-get install -y tailscale &>/dev/null
' || exit
TAGS=$(awk -F': ' '/^tags:/ {print $2}' /etc/pve/lxc/${CTID}.conf)
TAGS="${TAGS:+$TAGS; }tailscale"
pct set "$CTID" -tags "${TAGS}"
msg "\e[1;32m ✔ Installed Tailscale\e[0m"
msg "\e[1;31m Reboot ${CTID} LXC to apply the changes, then run tailscale up in the LXC console\e[0m"