mirror of
https://github.com/community-scripts/ProxmoxVE
synced 2025-02-12 02:39:17 +00:00
Compare commits
19 Commits
234a1ba030
...
42f1195ea9
Author | SHA1 | Date | |
---|---|---|---|
|
42f1195ea9 | ||
|
b01331480c | ||
|
198c5caeaa | ||
|
b4f2594cef | ||
|
2db7cb1fdb | ||
|
7ff44c562b | ||
|
7723269bbc | ||
|
7c3ad9cfcf | ||
|
dbb138317d | ||
|
75f90409eb | ||
|
17745c344b | ||
|
4e8317d30c | ||
|
0313de615a | ||
|
5415bfd21a | ||
|
3d99b49a99 | ||
|
d852e7b098 | ||
|
f23da27ba2 | ||
|
1c008a1742 | ||
|
3cea72cf51 |
63
.github/workflows/auto-update-app-headers.yml
vendored
63
.github/workflows/auto-update-app-headers.yml
vendored
@ -6,7 +6,7 @@ on:
|
|||||||
- main
|
- main
|
||||||
paths:
|
paths:
|
||||||
- 'ct/**.sh'
|
- 'ct/**.sh'
|
||||||
workflow_dispatch: # Ermöglicht das manuelle Ausführen der Action
|
workflow_dispatch:
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
update-app-files:
|
update-app-files:
|
||||||
@ -21,17 +21,21 @@ jobs:
|
|||||||
- name: Checkout repository
|
- name: Checkout repository
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v2
|
||||||
|
|
||||||
# Step 2: Set up Git user for committing changes
|
# Step 2: Disable file mode changes detection
|
||||||
|
- name: Disable file mode changes
|
||||||
|
run: git config core.fileMode false
|
||||||
|
|
||||||
|
# Step 3: Set up Git user for committing changes
|
||||||
- name: Set up Git
|
- name: Set up Git
|
||||||
run: |
|
run: |
|
||||||
git config --global user.name "GitHub Actions"
|
git config --global user.name "GitHub Actions"
|
||||||
git config --global user.email "actions@github.com"
|
git config --global user.email "github-actions[bot]@users.noreply.github.com"
|
||||||
|
|
||||||
# Step 3: Install figlet
|
# Step 4: Install figlet
|
||||||
- name: Install figlet
|
- name: Install figlet
|
||||||
run: sudo apt-get install -y figlet
|
run: sudo apt-get install -y figlet
|
||||||
|
|
||||||
# Step 4: Run the updated generate-app-files.sh script
|
# Step 5: Run the updated generate-app-files.sh script
|
||||||
- name: Run generate-app-files.sh
|
- name: Run generate-app-files.sh
|
||||||
run: |
|
run: |
|
||||||
chmod +x .github/workflows/scripts/generate-app-headers.sh
|
chmod +x .github/workflows/scripts/generate-app-headers.sh
|
||||||
@ -39,51 +43,40 @@ jobs:
|
|||||||
env:
|
env:
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
|
||||||
# Step 5: Check for changes
|
# Step 6: Check if there are any changes
|
||||||
- name: Check if there are any changes
|
- name: Check if there are any changes
|
||||||
id: verify-diff
|
id: verify-diff
|
||||||
run: |
|
run: |
|
||||||
git diff --quiet . || echo "changed=true" >> $GITHUB_OUTPUT
|
echo "Checking for changes..."
|
||||||
|
git status
|
||||||
|
if git diff --quiet; then
|
||||||
|
echo "No changes detected."
|
||||||
|
echo "changed=false" >> $GITHUB_OUTPUT
|
||||||
|
else
|
||||||
|
echo "Changes detected:"
|
||||||
|
git diff --stat
|
||||||
|
echo "changed=true" >> $GITHUB_OUTPUT
|
||||||
|
fi
|
||||||
|
|
||||||
# Step 6: Commit changes (if any) and create a PR
|
# Step 7: Commit changes (if any) and create a PR
|
||||||
- name: Commit and create PR if changes exist
|
- name: Commit and create PR if changes exist
|
||||||
if: steps.verify-diff.outputs.changed == 'true'
|
if: steps.verify-diff.outputs.changed == 'true'
|
||||||
run: |
|
run: |
|
||||||
git config --global user.name "github-actions[bot]"
|
git add -A
|
||||||
git config --global user.email "github-actions[bot]@users.noreply.github.com"
|
|
||||||
git add ct/*.app
|
|
||||||
git commit -m "Update .app files"
|
git commit -m "Update .app files"
|
||||||
git checkout -b pr-update-app-files
|
git checkout -b pr-update-app-files
|
||||||
git push origin pr-update-app-files --force
|
git push origin pr-update-app-files --force
|
||||||
|
|
||||||
# Create PR against main
|
|
||||||
gh pr create --title "[core] update .app files" \
|
gh pr create --title "[core] update .app files" \
|
||||||
--body "This PR is auto-generated by a Github Action to update the .app files." \
|
--body "This PR is auto-generated by a GitHub Action to update the .app files." \
|
||||||
--head pr-update-app-files \
|
--head pr-update-app-files \
|
||||||
--base main \
|
--base main \
|
||||||
--label "automated pr"
|
--label "automated pr"
|
||||||
env:
|
env:
|
||||||
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
|
||||||
- name: Re-approve pull request after update
|
# Step 8: Output success message when no changes
|
||||||
if: steps.verify-diff.outputs.changed == 'true'
|
- name: No changes detected
|
||||||
env:
|
if: steps.verify-diff.outputs.changed == 'false'
|
||||||
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
run: echo "No changes to commit. Workflow completed successfully."
|
||||||
run: |
|
|
||||||
# Get the PR number for the current branch
|
|
||||||
PR_NUMBER=$(gh pr list --head "pr-update-app-files" --json number --jq '.[].number')
|
|
||||||
|
|
||||||
# Check if a PR number was retrieved
|
|
||||||
if [ -n "$PR_NUMBER" ]; then
|
|
||||||
# Get the PR author
|
|
||||||
PR_AUTHOR=$(gh pr view "$PR_NUMBER" --json author --jq '.author.login')
|
|
||||||
|
|
||||||
# Approve the PR if it was not created by the bot
|
|
||||||
if [ "$PR_AUTHOR" != "github-actions[bot]" ]; then
|
|
||||||
gh pr review "$PR_NUMBER" --approve
|
|
||||||
else
|
|
||||||
echo "PR was created by the bot, skipping review."
|
|
||||||
fi
|
|
||||||
else
|
|
||||||
echo "No PR found for the current branch."
|
|
||||||
fi
|
|
||||||
|
22
.github/workflows/scripts/generate-app-headers.sh
vendored
Normal file → Executable file
22
.github/workflows/scripts/generate-app-headers.sh
vendored
Normal file → Executable file
@ -1,24 +1,30 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
# Base directory for headers
|
||||||
|
headers_dir="./ct/headers"
|
||||||
|
|
||||||
|
# Ensure the headers directory exists and clear it
|
||||||
|
mkdir -p "$headers_dir"
|
||||||
|
rm -f "$headers_dir"/*
|
||||||
|
|
||||||
# Find all .sh files in ./ct directory, sorted alphabetically
|
# Find all .sh files in ./ct directory, sorted alphabetically
|
||||||
find ./ct -type f -name "*.sh" | sort | while read -r script; do
|
find ./ct -type f -name "*.sh" | sort | while read -r script; do
|
||||||
# Extract the APP name from the APP line
|
# Extract the APP name from the APP line
|
||||||
app_name=$(grep -oP '^APP="\K[^"]+' "$script" 2>/dev/null)
|
app_name=$(grep -oP '^APP="\K[^"]+' "$script" 2>/dev/null)
|
||||||
|
|
||||||
if [[ -n "$app_name" ]]; then
|
if [[ -n "$app_name" ]]; then
|
||||||
# Define the output file name based on the .sh file
|
# Define the output file name in the headers directory
|
||||||
output_file="${script%.sh}.app"
|
output_file="${headers_dir}/$(basename "${script%.*}")"
|
||||||
|
|
||||||
# Check if the output file already exists
|
# Generate figlet output
|
||||||
if [[ ! -f "$output_file" ]]; then
|
figlet_output=$(figlet -f slant "$app_name")
|
||||||
# Generate figlet output
|
|
||||||
figlet_output=$(figlet -f slant "$app_name")
|
|
||||||
|
|
||||||
# Write the figlet output to the file
|
# Check if figlet output is not empty
|
||||||
|
if [[ -n "$figlet_output" ]]; then
|
||||||
echo "$figlet_output" > "$output_file"
|
echo "$figlet_output" > "$output_file"
|
||||||
echo "Generated: $output_file"
|
echo "Generated: $output_file"
|
||||||
else
|
else
|
||||||
echo "Skipped: $output_file already exists"
|
echo "Figlet failed for $app_name in $script"
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
echo "No APP name found in $script, skipping."
|
echo "No APP name found in $script, skipping."
|
||||||
|
@ -27,10 +27,15 @@ Do not break established syntax in this file, as it is automatically updated by
|
|||||||
|
|
||||||
### 🚀 Updated Scripts
|
### 🚀 Updated Scripts
|
||||||
|
|
||||||
|
- openHAB - Update to Zulu21 [@moodyblue](https://github.com/moodyblue) ([#1734](https://github.com/community-scripts/ProxmoxVE/pull/1734))
|
||||||
- Feature: Filebrowser Script > Redesign | Update Logic | Remove Logic [@MickLesk](https://github.com/MickLesk) ([#1716](https://github.com/community-scripts/ProxmoxVE/pull/1716))
|
- Feature: Filebrowser Script > Redesign | Update Logic | Remove Logic [@MickLesk](https://github.com/MickLesk) ([#1716](https://github.com/community-scripts/ProxmoxVE/pull/1716))
|
||||||
- Feature: Ubuntu 22.04 VM > Redesign | Optional HDD-Size Prompt [@MickLesk](https://github.com/MickLesk) ([#1712](https://github.com/community-scripts/ProxmoxVE/pull/1712))
|
- Feature: Ubuntu 22.04 VM > Redesign | Optional HDD-Size Prompt [@MickLesk](https://github.com/MickLesk) ([#1712](https://github.com/community-scripts/ProxmoxVE/pull/1712))
|
||||||
- Feature: Ubuntu 24.04 VM > Redesign | Optional HDD-Size Prompt | cifs support [@MickLesk](https://github.com/MickLesk) ([#1714](https://github.com/community-scripts/ProxmoxVE/pull/1714))
|
- Feature: Ubuntu 24.04 VM > Redesign | Optional HDD-Size Prompt | cifs support [@MickLesk](https://github.com/MickLesk) ([#1714](https://github.com/community-scripts/ProxmoxVE/pull/1714))
|
||||||
|
|
||||||
|
### 🧰 Maintenance
|
||||||
|
|
||||||
|
- [Core] Better Creation of App Headers for next feature [@MickLesk](https://github.com/MickLesk) ([#1719](https://github.com/community-scripts/ProxmoxVE/pull/1719))
|
||||||
|
|
||||||
## 2025-01-23
|
## 2025-01-23
|
||||||
|
|
||||||
### Changed
|
### Changed
|
||||||
|
@ -43,10 +43,10 @@ function update_script() {
|
|||||||
msg_info "Updating ${APP} to ${RELEASE}"
|
msg_info "Updating ${APP} to ${RELEASE}"
|
||||||
cd /tmp
|
cd /tmp
|
||||||
wget -q https://github.com/actualbudget/actual-server/archive/refs/tags/v${RELEASE}.tar.gz
|
wget -q https://github.com/actualbudget/actual-server/archive/refs/tags/v${RELEASE}.tar.gz
|
||||||
tar -xzf v${RELEASE}.tar.gz >/dev/null 2>&1
|
|
||||||
mv /opt/actualbudget /opt/actualbudget_bak
|
mv /opt/actualbudget /opt/actualbudget_bak
|
||||||
mkdir -p /opt/actualbudget/
|
mkdir -p /opt/actualbudget/
|
||||||
mv *ctual-server-* /opt/actualbudget
|
tar -xzf v${RELEASE}.tar.gz >/dev/null 2>&1
|
||||||
|
mv *ctual-server-*/* /opt/actualbudget
|
||||||
mv /opt/actualbudget_bak/.env /opt/actualbudget
|
mv /opt/actualbudget_bak/.env /opt/actualbudget
|
||||||
mv /opt/actualbudget_bak/server-files /opt/actualbudget/server-files
|
mv /opt/actualbudget_bak/server-files /opt/actualbudget/server-files
|
||||||
cd /opt/actualbudget
|
cd /opt/actualbudget
|
||||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user