mirror of
https://github.com/community-scripts/ProxmoxVE
synced 2025-02-09 01:09:16 +00:00
Compare commits
1 Commits
74c9684bba
...
2df0643406
Author | SHA1 | Date | |
---|---|---|---|
|
2df0643406 |
45
.github/workflows/check_and_update_json_date.yml
vendored
45
.github/workflows/check_and_update_json_date.yml
vendored
@ -1,32 +1,45 @@
|
|||||||
name: Update Date Created in PR
|
name: Check and Update JSON Date
|
||||||
|
|
||||||
on:
|
on:
|
||||||
pull_request:
|
pull_request:
|
||||||
|
types: [synchronize, opened, reopened, edited]
|
||||||
paths:
|
paths:
|
||||||
- '*.json'
|
- "json/*.json"
|
||||||
types: [opened, synchronize]
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
update-date:
|
update-date:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout PR branch
|
- name: Checkout code
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v3
|
||||||
|
|
||||||
|
- name: Set up Python
|
||||||
|
uses: actions/setup-python@v4
|
||||||
with:
|
with:
|
||||||
ref: ${{ github.head_ref }}
|
python-version: 3.12
|
||||||
|
|
||||||
- name: Install yq
|
- name: Install dependencies
|
||||||
run: |
|
run: pip install jq
|
||||||
curl -sSL https://github.com/mikefarah/yq/releases/download/v4.18.1/yq_linux_amd64 -o /usr/local/bin/yq
|
|
||||||
chmod +x /usr/local/bin/yq
|
|
||||||
|
|
||||||
- name: Update date_created in JSON
|
- name: Find and Update JSON files in /json folder
|
||||||
run: |
|
run: |
|
||||||
TODAY=$(date -u +%Y-%m-%d)
|
TODAY=$(date +%Y-%m-%d)
|
||||||
yq e '.date_created = strftime("%Y-%m-%d")' -i your_file.json
|
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 if necessary
|
- name: Commit changes
|
||||||
run: |
|
run: |
|
||||||
git status
|
git config user.name "GitHub Action"
|
||||||
git diff --quiet || (git commit -m "Update date_created to $TODAY" && git push origin ${{ github.head_ref }})
|
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 }}
|
||||||
|
@ -16,14 +16,6 @@ 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,13 +15,11 @@ network_check
|
|||||||
update_os
|
update_os
|
||||||
|
|
||||||
msg_info "Installing Dependencies"
|
msg_info "Installing Dependencies"
|
||||||
$STD apt-get install -y \
|
$STD apt-get install -y curl
|
||||||
curl \
|
$STD apt-get install -y sudo
|
||||||
sudo \
|
$STD apt-get install -y mc
|
||||||
mc \
|
$STD apt-get install -y gpg
|
||||||
gpg \
|
$STD apt-get install -y git
|
||||||
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