mirror of
https://github.com/community-scripts/ProxmoxVE
synced 2025-02-08 16:59:17 +00:00
Compare commits
34 Commits
4ce474382a
...
7614034784
Author | SHA1 | Date | |
---|---|---|---|
|
7614034784 | ||
|
0f06725fdc | ||
|
5c16955a8e | ||
|
2c8aab24d0 | ||
|
9cc07cc6e1 | ||
|
047667c428 | ||
|
147ba0e78d | ||
|
d3b0becfe6 | ||
|
d20d0428dc | ||
|
0368ce36d1 | ||
|
757b5bd267 | ||
|
4d0632fea0 | ||
|
69288b197f | ||
|
12a61a1d71 | ||
|
d186557488 | ||
|
db6390f791 | ||
|
41c4b11575 | ||
|
bf89a037bd | ||
|
e503ce3806 | ||
|
c934085b16 | ||
|
c57f0be737 | ||
|
e6530e14dd | ||
|
9174536e95 | ||
|
aa3a3997f0 | ||
|
37da2e5e1c | ||
|
18538897ba | ||
|
dbfb72807a | ||
|
e756c49e50 | ||
|
4ae131e102 | ||
|
f498f349f3 | ||
|
8e525611bd | ||
|
910f3bb6f4 | ||
|
c8319f044c | ||
|
ac61a925cc |
@ -34,8 +34,8 @@ jobs:
|
|||||||
# Step 4: Run the generate-app-headers.sh script to update .app-headers
|
# Step 4: Run the generate-app-headers.sh script to update .app-headers
|
||||||
- name: Run generate-app-headers.sh to update .app-headers
|
- name: Run generate-app-headers.sh to update .app-headers
|
||||||
run: |
|
run: |
|
||||||
chmod +x .github/workflows/generate-app-headers.sh
|
chmod +x .github/workflows/scripts/generate-app-headers.sh
|
||||||
.github/workflows/generate-app-headers.sh
|
.github/workflows/scripts/generate-app-headers.sh
|
||||||
env:
|
env:
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
|
||||||
|
60
.github/workflows/backup/check_and_update_json_date.yml
vendored
Normal file
60
.github/workflows/backup/check_and_update_json_date.yml
vendored
Normal file
@ -0,0 +1,60 @@
|
|||||||
|
name: Update date_created in JSON files
|
||||||
|
|
||||||
|
on:
|
||||||
|
# Dieser Trigger wird für das Öffnen von PRs sowie für das Aktualisieren von offenen PRs verwendet
|
||||||
|
pull_request:
|
||||||
|
types: [opened, synchronize]
|
||||||
|
schedule:
|
||||||
|
# Dieser Trigger wird 4x am Tag ausgelöst, um sicherzustellen, dass das Datum aktualisiert wird
|
||||||
|
- cron: "0 0,6,12,18 * * *" # Führt alle 6 Stunden aus
|
||||||
|
workflow_dispatch: # Manuelle Ausführung des Workflows möglich
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
update-date:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: Checkout repository
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- name: Install yq
|
||||||
|
run: |
|
||||||
|
sudo apt-get update
|
||||||
|
sudo apt-get install -y yq
|
||||||
|
|
||||||
|
- name: Set the current date
|
||||||
|
id: set_date
|
||||||
|
run: echo "TODAY=$(date -u +%Y-%m-%d)" >> $GITHUB_ENV
|
||||||
|
|
||||||
|
- name: Check for changes in PR
|
||||||
|
run: |
|
||||||
|
# Hole den PR-Branch
|
||||||
|
PR_BRANCH="refs/pull/${{ github.event.pull_request.number }}/merge"
|
||||||
|
git fetch origin $PR_BRANCH
|
||||||
|
|
||||||
|
# Liste alle JSON-Dateien im PR auf, die geändert wurden
|
||||||
|
CHANGED_JSON_FILES=$(git diff --name-only origin/main...$PR_BRANCH | grep '.json')
|
||||||
|
|
||||||
|
if [ -z "$CHANGED_JSON_FILES" ]; then
|
||||||
|
echo "No JSON files changed in this PR."
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Gehe alle geänderten JSON-Dateien durch und aktualisiere das Datum
|
||||||
|
for file in $CHANGED_JSON_FILES; do
|
||||||
|
echo "Updating date_created in $file"
|
||||||
|
# Setze das aktuelle Datum
|
||||||
|
yq eval ".date_created = \"${{ env.TODAY }}\"" -i "$file"
|
||||||
|
git add "$file"
|
||||||
|
done
|
||||||
|
|
||||||
|
- name: Commit and push changes
|
||||||
|
run: |
|
||||||
|
# Prüfe, ob es Änderungen gibt und committe sie
|
||||||
|
git config user.name "json-updater-bot"
|
||||||
|
git config user.email "github-actions[bot]@users.noreply.github.com"
|
||||||
|
|
||||||
|
git commit -m "Update date_created to ${{ env.TODAY }}" || echo "No changes to commit"
|
||||||
|
|
||||||
|
# Push zurück in den PR-Branch
|
||||||
|
git push origin $PR_BRANCH
|
45
.github/workflows/check_and_update_json_date.yml
vendored
45
.github/workflows/check_and_update_json_date.yml
vendored
@ -1,45 +0,0 @@
|
|||||||
name: Check and Update JSON Date
|
|
||||||
|
|
||||||
on:
|
|
||||||
pull_request:
|
|
||||||
types: [synchronize, opened, reopened, edited]
|
|
||||||
paths:
|
|
||||||
- "json/*.json"
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
update-date:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- name: Checkout code
|
|
||||||
uses: actions/checkout@v3
|
|
||||||
|
|
||||||
- name: Set up Python
|
|
||||||
uses: actions/setup-python@v4
|
|
||||||
with:
|
|
||||||
python-version: 3.12
|
|
||||||
|
|
||||||
- name: Install dependencies
|
|
||||||
run: pip install jq
|
|
||||||
|
|
||||||
- name: Find and Update JSON files in /json folder
|
|
||||||
run: |
|
|
||||||
TODAY=$(date +%Y-%m-%d)
|
|
||||||
for file in $(git diff --diff-filter=A --name-only HEAD | grep '^json/.*\.json$'); do
|
|
||||||
if jq -e '.date_created' $file > /dev/null 2>&1; then
|
|
||||||
echo "Updating date_created in $file"
|
|
||||||
jq --arg date "$TODAY" '.date_created = $date' $file > temp.json && mv temp.json $file
|
|
||||||
git add $file
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
|
|
||||||
- name: Commit changes
|
|
||||||
run: |
|
|
||||||
git config user.name "GitHub Action"
|
|
||||||
git config user.email "action@github.com"
|
|
||||||
git commit -m "Update date_created in new JSON files" || echo "No changes to commit"
|
|
||||||
|
|
||||||
- name: Push changes
|
|
||||||
uses: ad-m/github-push-action@v0.6.0
|
|
||||||
with:
|
|
||||||
github_token: ${{ secrets.GITHUB_TOKEN }}
|
|
23
.github/workflows/scripts/update_json_date.sh
vendored
Normal file
23
.github/workflows/scripts/update_json_date.sh
vendored
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
# Verzeichnis, das die JSON-Dateien enthält
|
||||||
|
json_dir="./json/*.json"
|
||||||
|
|
||||||
|
current_date=$(date +"%Y-%m-%d")
|
||||||
|
|
||||||
|
for json_file in $json_dir; do
|
||||||
|
if [[ -f "$json_file" ]]; then
|
||||||
|
current_json_date=$(jq -r '.date_created' "$json_file")
|
||||||
|
|
||||||
|
if [[ "$current_json_date" != "$current_date" ]]; then
|
||||||
|
echo "Updating $json_file with date $current_date"
|
||||||
|
jq --arg date "$current_date" '.date_created = $date' "$json_file" > temp.json && mv temp.json "$json_file"
|
||||||
|
|
||||||
|
git add "$json_file"
|
||||||
|
git commit -m "Update date_created to $current_date in $json_file"
|
||||||
|
else
|
||||||
|
echo "Date in $json_file is already up to date."
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
git push origin HEAD
|
41
.github/workflows/update_json_date.yml
vendored
Normal file
41
.github/workflows/update_json_date.yml
vendored
Normal file
@ -0,0 +1,41 @@
|
|||||||
|
name: Update JSON Date in PR
|
||||||
|
|
||||||
|
on:
|
||||||
|
pull_request:
|
||||||
|
paths:
|
||||||
|
- 'json/*.json'
|
||||||
|
types: [opened, synchronize, reopened]
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
update_json:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: Check out repository
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
with:
|
||||||
|
ref: ${{ github.head_ref }}
|
||||||
|
|
||||||
|
- name: Configure Git user
|
||||||
|
run: |
|
||||||
|
git config --global user.email "github-actions[bot]@users.noreply.github.com"
|
||||||
|
git config --global user.name "github-actions[bot]"
|
||||||
|
|
||||||
|
- name: Make script executable
|
||||||
|
run: chmod +x .github/workflows/scripts/update_json_date.sh
|
||||||
|
|
||||||
|
- name: Run the update script
|
||||||
|
run: ./.github/workflows/scripts/update_json_date.sh
|
||||||
|
|
||||||
|
- name: Commit changes if updated
|
||||||
|
run: |
|
||||||
|
git add *.json
|
||||||
|
git diff --cached --quiet || git commit -m "Update JSON dates"
|
||||||
|
|
||||||
|
- name: Push changes with API keys
|
||||||
|
env:
|
||||||
|
JSON_API_ID: ${{ secrets.JSON_API_ID }}
|
||||||
|
JSON_API_KEY: ${{ secrets.JSON_API_KEY }}
|
||||||
|
run: |
|
||||||
|
git remote set-url origin https://$JSON_API_ID:$JSON_API_KEY@github.com/${{ github.repository }}.git
|
||||||
|
git push
|
@ -16,6 +16,14 @@ All LXC instances created using this repository come pre-installed with Midnight
|
|||||||
> [!IMPORTANT]
|
> [!IMPORTANT]
|
||||||
Do not break established syntax in this file, as it is automatically updated by a Github Workflow
|
Do not break established syntax in this file, as it is automatically updated by a Github Workflow
|
||||||
|
|
||||||
|
## 2025-01-15
|
||||||
|
|
||||||
|
### Changed
|
||||||
|
|
||||||
|
### 🚀 Updated Scripts
|
||||||
|
|
||||||
|
- Fix: Add FFMPEG for OpenWebUI [@MickLesk](https://github.com/MickLesk) ([#1497](https://github.com/community-scripts/ProxmoxVE/pull/1497))
|
||||||
|
|
||||||
## 2025-01-14
|
## 2025-01-14
|
||||||
|
|
||||||
### Changed
|
### Changed
|
||||||
|
@ -15,11 +15,13 @@ network_check
|
|||||||
update_os
|
update_os
|
||||||
|
|
||||||
msg_info "Installing Dependencies"
|
msg_info "Installing Dependencies"
|
||||||
$STD apt-get install -y curl
|
$STD apt-get install -y \
|
||||||
$STD apt-get install -y sudo
|
curl \
|
||||||
$STD apt-get install -y mc
|
sudo \
|
||||||
$STD apt-get install -y gpg
|
mc \
|
||||||
$STD apt-get install -y git
|
gpg \
|
||||||
|
git \
|
||||||
|
ffmpeg
|
||||||
msg_ok "Installed Dependencies"
|
msg_ok "Installed Dependencies"
|
||||||
|
|
||||||
msg_info "Installing Python3 Dependencies"
|
msg_info "Installing Python3 Dependencies"
|
||||||
|
Loading…
Reference in New Issue
Block a user