mirror of
https://github.com/community-scripts/ProxmoxVE
synced 2025-02-10 09:49:18 +00:00
Test
This commit is contained in:
parent
d034a1f531
commit
253796a073
9
.github/workflows/validate-filenames.yml
vendored
9
.github/workflows/validate-filenames.yml
vendored
@ -6,6 +6,7 @@ on:
|
|||||||
- "ct/*.sh"
|
- "ct/*.sh"
|
||||||
- "install/*.sh"
|
- "install/*.sh"
|
||||||
- "json/*.json"
|
- "json/*.json"
|
||||||
|
- ".github/workflows/validate-filenames.yml"
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
check-files:
|
check-files:
|
||||||
@ -28,7 +29,7 @@ jobs:
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
- name: "Validate filenames in ct and install directory"
|
- name: "Validate filenames in ct and install directory"
|
||||||
if: always()
|
if: always() && steps.changed-files.outputs.files != ''
|
||||||
id: check-scripts
|
id: check-scripts
|
||||||
run: |
|
run: |
|
||||||
CHANGED_FILES=$(printf "%s\n" ${{ steps.changed-files.outputs.files }} | { grep -E '^(ct|install)/.*\.sh$' || true; })
|
CHANGED_FILES=$(printf "%s\n" ${{ steps.changed-files.outputs.files }} | { grep -E '^(ct|install)/.*\.sh$' || true; })
|
||||||
@ -51,7 +52,7 @@ jobs:
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
- name: "Validate filenames in json directory."
|
- name: "Validate filenames in json directory."
|
||||||
if: always()
|
if: always() && steps.changed-files.outputs.files != ''
|
||||||
id: check-json
|
id: check-json
|
||||||
run: |
|
run: |
|
||||||
CHANGED_FILES=$(printf "%s\n" ${{ steps.changed-files.outputs.files }} | { grep -E '^json/.*\.json$' || true; })
|
CHANGED_FILES=$(printf "%s\n" ${{ steps.changed-files.outputs.files }} | { grep -E '^json/.*\.json$' || true; })
|
||||||
@ -74,7 +75,7 @@ jobs:
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
- name: Post results and comment
|
- name: Post results and comment
|
||||||
if: always() && github.event_name == 'pull_request'
|
if: always() && steps.check-scripts.outputs.files != '' && steps.check-json.outputs.files != '' && github.event_name == 'pull_request'
|
||||||
uses: actions/github-script@v7
|
uses: actions/github-script@v7
|
||||||
with:
|
with:
|
||||||
script: |
|
script: |
|
||||||
@ -87,7 +88,7 @@ jobs:
|
|||||||
const issueNumber = context.payload.pull_request
|
const issueNumber = context.payload.pull_request
|
||||||
? context.payload.pull_request.number
|
? context.payload.pull_request.number
|
||||||
: null;
|
: null;
|
||||||
const commentIdentifier = "filename-check";
|
const commentIdentifier = "validate-filenames";
|
||||||
let newCommentBody = `<!-- ${commentIdentifier}-start -->\n### Filename validation\n\n`;
|
let newCommentBody = `<!-- ${commentIdentifier}-start -->\n### Filename validation\n\n`;
|
||||||
|
|
||||||
if (result === "failure") {
|
if (result === "failure") {
|
||||||
|
Loading…
Reference in New Issue
Block a user