mirror of
https://github.com/community-scripts/ProxmoxVE
synced 2025-02-09 01:09:16 +00:00
Compare commits
No commits in common. "959a7b4b144792678874baa3d0ecde237b264123" and "7614034784c82a55d995bf1137b4792a750eb5c5" have entirely different histories.
959a7b4b14
...
7614034784
53
.github/workflows/update_json_date.yml
vendored
53
.github/workflows/update_json_date.yml
vendored
@ -2,12 +2,9 @@ name: Update JSON Date in PR
|
|||||||
|
|
||||||
on:
|
on:
|
||||||
pull_request:
|
pull_request:
|
||||||
branches:
|
paths:
|
||||||
- main
|
- 'json/*.json'
|
||||||
types:
|
types: [opened, synchronize, reopened]
|
||||||
- opened
|
|
||||||
- synchronize
|
|
||||||
- reopened
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
update_json:
|
update_json:
|
||||||
@ -16,53 +13,29 @@ jobs:
|
|||||||
steps:
|
steps:
|
||||||
- name: Check out repository
|
- name: Check out repository
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
|
with:
|
||||||
|
ref: ${{ github.head_ref }}
|
||||||
|
|
||||||
- name: Configure Git user
|
- name: Configure Git user
|
||||||
run: |
|
run: |
|
||||||
git config --global user.email "github-actions[bot]@users.noreply.github.com"
|
git config --global user.email "github-actions[bot]@users.noreply.github.com"
|
||||||
git config --global user.name "github-actions[bot]"
|
git config --global user.name "github-actions[bot]"
|
||||||
|
|
||||||
- name: Get list of changed files in PR
|
- name: Make script executable
|
||||||
id: files
|
run: chmod +x .github/workflows/scripts/update_json_date.sh
|
||||||
uses: actions/github-script@v7
|
|
||||||
with:
|
|
||||||
script: |
|
|
||||||
const prNumber = context.payload.pull_request.number;
|
|
||||||
const prFiles = await github.rest.pulls.listFiles({
|
|
||||||
owner: context.repo.owner,
|
|
||||||
repo: context.repo.repo,
|
|
||||||
pull_number: prNumber,
|
|
||||||
});
|
|
||||||
|
|
||||||
// Filter for JSON files only
|
- name: Run the update script
|
||||||
const changedJsonFiles = prFiles.data
|
run: ./.github/workflows/scripts/update_json_date.sh
|
||||||
.filter(file => file.filename.endsWith('.json'))
|
|
||||||
.map(file => file.filename);
|
|
||||||
|
|
||||||
core.setOutput('changed_files', changedJsonFiles.join('\n'));
|
|
||||||
console.log('Changed JSON files:', changedJsonFiles);
|
|
||||||
|
|
||||||
- name: Update dates in changed JSON files
|
|
||||||
run: |
|
|
||||||
changed_files="${{ steps.files.outputs.changed_files }}"
|
|
||||||
if [[ -z "$changed_files" ]]; then
|
|
||||||
echo "No JSON files changed in this PR. Exiting."
|
|
||||||
exit 0
|
|
||||||
fi
|
|
||||||
|
|
||||||
for file in $changed_files; do
|
|
||||||
echo "Updating $file with current date."
|
|
||||||
# Your logic to update the file
|
|
||||||
jq '.date_created = "'"$(date +%Y-%m-%d)"'"' "$file" > tmp.$$.json && mv tmp.$$.json "$file"
|
|
||||||
done
|
|
||||||
|
|
||||||
- name: Commit changes if updated
|
- name: Commit changes if updated
|
||||||
run: |
|
run: |
|
||||||
git add *.json
|
git add *.json
|
||||||
git diff --cached --quiet || git commit -m "Update JSON dates"
|
git diff --cached --quiet || git commit -m "Update JSON dates"
|
||||||
|
|
||||||
- name: Push changes
|
- name: Push changes with API keys
|
||||||
env:
|
env:
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
JSON_API_ID: ${{ secrets.JSON_API_ID }}
|
||||||
|
JSON_API_KEY: ${{ secrets.JSON_API_KEY }}
|
||||||
run: |
|
run: |
|
||||||
|
git remote set-url origin https://$JSON_API_ID:$JSON_API_KEY@github.com/${{ github.repository }}.git
|
||||||
git push
|
git push
|
||||||
|
@ -24,10 +24,6 @@ Do not break established syntax in this file, as it is automatically updated by
|
|||||||
|
|
||||||
- Fix: Add FFMPEG for OpenWebUI [@MickLesk](https://github.com/MickLesk) ([#1497](https://github.com/community-scripts/ProxmoxVE/pull/1497))
|
- Fix: Add FFMPEG for OpenWebUI [@MickLesk](https://github.com/MickLesk) ([#1497](https://github.com/community-scripts/ProxmoxVE/pull/1497))
|
||||||
|
|
||||||
### 🧰 Maintenance
|
|
||||||
|
|
||||||
- [core] build.func&install.func: Fix ssh keynot added error [@dsiebel](https://github.com/dsiebel) ([#1502](https://github.com/community-scripts/ProxmoxVE/pull/1502))
|
|
||||||
|
|
||||||
## 2025-01-14
|
## 2025-01-14
|
||||||
|
|
||||||
### Changed
|
### Changed
|
||||||
|
@ -827,7 +827,6 @@ build_container() {
|
|||||||
export PASSWORD="$PW"
|
export PASSWORD="$PW"
|
||||||
export VERBOSE="$VERB"
|
export VERBOSE="$VERB"
|
||||||
export SSH_ROOT="${SSH}"
|
export SSH_ROOT="${SSH}"
|
||||||
export SSH_AUTHORIZED_KEY
|
|
||||||
export CTID="$CT_ID"
|
export CTID="$CT_ID"
|
||||||
export CTTYPE="$CT_TYPE"
|
export CTTYPE="$CT_TYPE"
|
||||||
export PCT_OSTYPE="$var_os"
|
export PCT_OSTYPE="$var_os"
|
||||||
|
@ -255,11 +255,4 @@ EOF
|
|||||||
fi
|
fi
|
||||||
echo "bash -c \"\$(wget -qLO - https://github.com/community-scripts/ProxmoxVE/raw/main/ct/${app}.sh)\"" >/usr/bin/update
|
echo "bash -c \"\$(wget -qLO - https://github.com/community-scripts/ProxmoxVE/raw/main/ct/${app}.sh)\"" >/usr/bin/update
|
||||||
chmod +x /usr/bin/update
|
chmod +x /usr/bin/update
|
||||||
|
|
||||||
if [[ -n "${SSH_AUTHORIZED_KEY}" ]]; then
|
|
||||||
mkdir -p /root/.ssh
|
|
||||||
echo "${SSH_AUTHORIZED_KEY}" > /root/.ssh/authorized_keys
|
|
||||||
chmod 700 /root/.ssh
|
|
||||||
chmod 600 /root/.ssh/authorized_keys
|
|
||||||
fi
|
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user