mirror of
https://github.com/community-scripts/ProxmoxVE
synced 2025-01-10 19:05:09 +00:00
Compare commits
9 Commits
16aac643d9
...
ffb3abc51f
Author | SHA1 | Date | |
---|---|---|---|
|
ffb3abc51f | ||
|
4da57bd76c | ||
|
29b98b450b | ||
|
c88d3a3883 | ||
|
f5a54bc3ad | ||
|
2078deca57 | ||
|
bc702e2a6d | ||
|
84e5fafd0d | ||
|
24a7149794 |
@ -1,23 +1,36 @@
|
||||
name: Validate filenames
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
pull_request_target:
|
||||
paths:
|
||||
- "ct/*.sh"
|
||||
- "install/*.sh"
|
||||
- "json/*.json"
|
||||
- ".github/workflows/validate-filenames.yml"
|
||||
|
||||
jobs:
|
||||
check-files:
|
||||
name: Check changed files
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
pull-requests: write
|
||||
|
||||
steps:
|
||||
- name: Get pull request information
|
||||
uses: actions/github-script@v7
|
||||
id: pr
|
||||
with:
|
||||
script: |
|
||||
const { data: pullRequest } = await github.rest.pulls.get({
|
||||
...context.repo,
|
||||
pull_number: context.payload.pull_request.number,
|
||||
});
|
||||
return pullRequest;
|
||||
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 0 # Ensure the full history is fetched for accurate diffing
|
||||
ref: ${{ fromJSON(steps.pr.outputs.result).merge_commit_sha }}
|
||||
|
||||
- name: Get changed files
|
||||
id: changed-files
|
@ -4,11 +4,10 @@ on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
pull_request:
|
||||
pull_request_target:
|
||||
paths:
|
||||
- "**/*.sh"
|
||||
- "**/*.func"
|
||||
- ".github/workflows/validate-formatting.yaml"
|
||||
|
||||
jobs:
|
||||
shfmt:
|
||||
@ -18,10 +17,22 @@ jobs:
|
||||
pull-requests: write
|
||||
|
||||
steps:
|
||||
- name: Get pull request information
|
||||
uses: actions/github-script@v7
|
||||
id: pr
|
||||
with:
|
||||
script: |
|
||||
const { data: pullRequest } = await github.rest.pulls.get({
|
||||
...context.repo,
|
||||
pull_number: context.payload.pull_request.number,
|
||||
});
|
||||
return pullRequest;
|
||||
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 0
|
||||
fetch-depth: 0 # Ensure the full history is fetched for accurate diffing
|
||||
ref: ${{ fromJSON(steps.pr.outputs.result).merge_commit_sha }}
|
||||
|
||||
- name: Get changed files
|
||||
id: changed-files
|
21
.github/workflows/validate-scripts.yml
vendored
21
.github/workflows/validate-scripts.yml
vendored
@ -3,11 +3,10 @@ on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
pull_request:
|
||||
pull_request_target:
|
||||
paths:
|
||||
- "ct/*.sh"
|
||||
- "install/*.sh"
|
||||
- ".github/workflows/validate-scripts.yml"
|
||||
|
||||
jobs:
|
||||
check-scripts:
|
||||
@ -17,10 +16,26 @@ jobs:
|
||||
pull-requests: write
|
||||
|
||||
steps:
|
||||
- name: Get pull request information
|
||||
uses: actions/github-script@v7
|
||||
id: pr
|
||||
with:
|
||||
script: |
|
||||
const { data: pullRequest } = await github.rest.pulls.get({
|
||||
...context.repo,
|
||||
pull_number: context.payload.pull_request.number,
|
||||
});
|
||||
return pullRequest;
|
||||
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: ${{ github.event_name == 'pull_request' && 2 || 0 }}
|
||||
fetch-depth: 0 # Ensure the full history is fetched for accurate diffing
|
||||
ref: ${{fromJSON(steps.pr.outputs.result).merge_commit_sha}}
|
||||
|
||||
- name: Set execute permission for .sh files
|
||||
run: |
|
||||
chmod +x ct/*.sh
|
||||
|
||||
- name: Get changed files
|
||||
id: changed-files
|
||||
|
12
CHANGELOG.md
12
CHANGELOG.md
@ -16,6 +16,18 @@ All LXC instances created using this repository come pre-installed with Midnight
|
||||
> [!IMPORTANT]
|
||||
Do not break established syntax in this file, as it is automatically updated by a Github Workflow
|
||||
|
||||
## 2025-01-07
|
||||
|
||||
### Changed
|
||||
|
||||
### 🚀 Updated Scripts
|
||||
|
||||
- Fix: Folder-Check for Updatescript Zammad [@michelroegl-brunner](https://github.com/michelroegl-brunner) ([#1309](https://github.com/community-scripts/ProxmoxVE/pull/1309))
|
||||
|
||||
### 🧰 Maintenance
|
||||
|
||||
- Set Execution Rights for GH-Action: Validate Scripts [@MickLesk](https://github.com/MickLesk) ([#1312](https://github.com/community-scripts/ProxmoxVE/pull/1312))
|
||||
|
||||
## 2025-01-06
|
||||
|
||||
### Changed
|
||||
|
@ -28,7 +28,7 @@ function update_script() {
|
||||
header_info
|
||||
check_container_storage
|
||||
check_container_resources
|
||||
if [[ ! -d /opt/zamad ]]; then
|
||||
if [[ ! -d /opt/zammad ]]; then
|
||||
msg_error "No ${APP} Installation Found!"
|
||||
exit
|
||||
fi
|
||||
|
@ -256,3 +256,23 @@ EOF
|
||||
echo "bash -c \"\$(wget -qLO - https://github.com/community-scripts/ProxmoxVE/raw/main/ct/${app}.sh)\"" >/usr/bin/update
|
||||
chmod +x /usr/bin/update
|
||||
}
|
||||
|
||||
# This function downloads the latest release of a GitHub repository
|
||||
github_download_latest_release() {
|
||||
local user="$1"
|
||||
local repo="$2"
|
||||
local output_file="$3"
|
||||
local tarball_url=$($STD wget -qLO - "https://api.github.com/repos/$user/$repo/releases/latest" | grep '"tarball_url":' | cut -d '"' -f 4)
|
||||
$STD wget -qLO "$output_file" "$tarball_url"
|
||||
}
|
||||
|
||||
# This function extracts a GitHub release tarball into a target directory
|
||||
github_extract_latest_release() {
|
||||
local user="$1"
|
||||
local repo="$2"
|
||||
local output_directory="$3"
|
||||
mkdir -p "$output_directory"
|
||||
github_download_latest_release "$user" "$repo" "/tmp/$repo.tar.gz"
|
||||
tar -xzf "/tmp/$repo.tar.gz" -C "$output_directory" --strip-components 1
|
||||
rm "/tmp/$repo.tar.gz"
|
||||
}
|
Loading…
Reference in New Issue
Block a user