mirror of
https://github.com/community-scripts/ProxmoxVE
synced 2025-02-10 01:39:17 +00:00
Compare commits
1 Commits
a09b708fa9
...
8ec1f94a3f
Author | SHA1 | Date | |
---|---|---|---|
|
8ec1f94a3f |
@ -1,36 +1,23 @@
|
|||||||
name: Validate filenames
|
name: Validate filenames
|
||||||
|
|
||||||
on:
|
on:
|
||||||
pull_request_target:
|
pull_request:
|
||||||
paths:
|
paths:
|
||||||
- "ct/*.sh"
|
- "ct/*.sh"
|
||||||
- "install/*.sh"
|
- "install/*.sh"
|
||||||
- "json/*.json"
|
- "json/*.json"
|
||||||
|
- ".github/workflows/validate-filenames.yml"
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
check-files:
|
check-files:
|
||||||
name: Check changed files
|
name: Check changed files
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
permissions:
|
|
||||||
pull-requests: write
|
|
||||||
|
|
||||||
steps:
|
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
|
- name: Checkout code
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
with:
|
with:
|
||||||
fetch-depth: 0 # Ensure the full history is fetched for accurate diffing
|
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
|
- name: Get changed files
|
||||||
id: changed-files
|
id: changed-files
|
@ -4,10 +4,11 @@ on:
|
|||||||
push:
|
push:
|
||||||
branches:
|
branches:
|
||||||
- main
|
- main
|
||||||
pull_request_target:
|
pull_request:
|
||||||
paths:
|
paths:
|
||||||
- "**/*.sh"
|
- "**/*.sh"
|
||||||
- "**/*.func"
|
- "**/*.func"
|
||||||
|
- ".github/workflows/validate-formatting.yaml"
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
shfmt:
|
shfmt:
|
||||||
@ -17,22 +18,10 @@ jobs:
|
|||||||
pull-requests: write
|
pull-requests: write
|
||||||
|
|
||||||
steps:
|
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
|
- name: Checkout code
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
with:
|
with:
|
||||||
fetch-depth: 0 # Ensure the full history is fetched for accurate diffing
|
fetch-depth: 0
|
||||||
ref: ${{ fromJSON(steps.pr.outputs.result).merge_commit_sha }}
|
|
||||||
|
|
||||||
- name: Get changed files
|
- name: Get changed files
|
||||||
id: changed-files
|
id: changed-files
|
17
.github/workflows/validate-scripts.yml
vendored
17
.github/workflows/validate-scripts.yml
vendored
@ -3,10 +3,11 @@ on:
|
|||||||
push:
|
push:
|
||||||
branches:
|
branches:
|
||||||
- main
|
- main
|
||||||
pull_request_target:
|
pull_request:
|
||||||
paths:
|
paths:
|
||||||
- "ct/*.sh"
|
- "ct/*.sh"
|
||||||
- "install/*.sh"
|
- "install/*.sh"
|
||||||
|
- ".github/workflows/validate-scripts.yml"
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
check-scripts:
|
check-scripts:
|
||||||
@ -16,22 +17,10 @@ jobs:
|
|||||||
pull-requests: write
|
pull-requests: write
|
||||||
|
|
||||||
steps:
|
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
|
- name: Checkout code
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
with:
|
with:
|
||||||
fetch-depth: 0 # Ensure the full history is fetched for accurate diffing
|
fetch-depth: ${{ github.event_name == 'pull_request' && 2 || 0 }}
|
||||||
ref: ${{fromJSON(steps.pr.outputs.result).merge_commit_sha}}
|
|
||||||
|
|
||||||
- name: Set execute permission for .sh files
|
- name: Set execute permission for .sh files
|
||||||
run: |
|
run: |
|
||||||
|
@ -26,7 +26,6 @@ Do not break established syntax in this file, as it is automatically updated by
|
|||||||
|
|
||||||
### 🧰 Maintenance
|
### 🧰 Maintenance
|
||||||
|
|
||||||
- fix: permissions of validate pipelines [@se-bastiaan](https://github.com/se-bastiaan) ([#1316](https://github.com/community-scripts/ProxmoxVE/pull/1316))
|
|
||||||
- Set Execution Rights for GH-Action: Validate Scripts [@MickLesk](https://github.com/MickLesk) ([#1312](https://github.com/community-scripts/ProxmoxVE/pull/1312))
|
- 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
|
## 2025-01-06
|
||||||
|
Loading…
Reference in New Issue
Block a user