mirror of
https://github.com/community-scripts/ProxmoxVE
synced 2025-02-04 06:50:15 +00:00
Compare commits
1 Commits
d4c6e7dd67
...
fa7af4352a
Author | SHA1 | Date | |
---|---|---|---|
|
fa7af4352a |
17
.github/workflows/validate-filenames.yml
vendored
17
.github/workflows/validate-filenames.yml
vendored
@ -1,36 +1,23 @@
|
||||
name: Validate filenames
|
||||
|
||||
on:
|
||||
pull_request_target:
|
||||
pull_request:
|
||||
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
|
||||
|
17
.github/workflows/validate-formatting.yaml
vendored
17
.github/workflows/validate-formatting.yaml
vendored
@ -4,10 +4,11 @@ on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
pull_request_target:
|
||||
pull_request:
|
||||
paths:
|
||||
- "**/*.sh"
|
||||
- "**/*.func"
|
||||
- ".github/workflows/validate-formatting.yaml"
|
||||
|
||||
jobs:
|
||||
shfmt:
|
||||
@ -17,22 +18,10 @@ 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 # Ensure the full history is fetched for accurate diffing
|
||||
ref: ${{ fromJSON(steps.pr.outputs.result).merge_commit_sha }}
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Get 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:
|
||||
branches:
|
||||
- main
|
||||
pull_request_target:
|
||||
pull_request:
|
||||
paths:
|
||||
- "ct/*.sh"
|
||||
- "install/*.sh"
|
||||
- ".github/workflows/validate-scripts.yml"
|
||||
|
||||
jobs:
|
||||
check-scripts:
|
||||
@ -16,22 +17,10 @@ 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 # Ensure the full history is fetched for accurate diffing
|
||||
ref: ${{fromJSON(steps.pr.outputs.result).merge_commit_sha}}
|
||||
fetch-depth: ${{ github.event_name == 'pull_request' && 2 || 0 }}
|
||||
|
||||
- name: Set execute permission for .sh files
|
||||
run: |
|
||||
|
Loading…
Reference in New Issue
Block a user