mirror of
https://github.com/linuxserver/reverse-proxy-confs.git
synced 2025-07-07 05:21:31 -07:00
Merge pull request #249 from linuxserver/version-wf
Update workflow for version checks
This commit is contained in:
commit
6ed41573ad
2 changed files with 34 additions and 24 deletions
24
.github/workflows/allowed_names.yml
vendored
24
.github/workflows/allowed_names.yml
vendored
|
@ -1,24 +0,0 @@
|
|||
name: Check Allowed File Names
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ master ]
|
||||
pull_request:
|
||||
branches: [ master ]
|
||||
|
||||
jobs:
|
||||
check-allowed-file-names:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
|
||||
- name: Check Allowed File Names
|
||||
run: |
|
||||
NOT_SAMPLES=$(find . -not -path '*/\.*' -type f ! \( -name '*.conf.sample' -o -name 'README.md' -o -name 'LICENSE' \))
|
||||
NOT_SAMPLES_COUNT=$(echo "${NOT_SAMPLES}" | wc -w)
|
||||
if (( NOT_SAMPLES_COUNT > 0 )); then
|
||||
echo "The following files are not allowed:"
|
||||
echo "${NOT_SAMPLES}"
|
||||
exit 1
|
||||
fi
|
34
.github/workflows/check_samples.yml
vendored
Normal file
34
.github/workflows/check_samples.yml
vendored
Normal file
|
@ -0,0 +1,34 @@
|
|||
name: Check Samples
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ master ]
|
||||
pull_request:
|
||||
branches: [ master ]
|
||||
|
||||
jobs:
|
||||
check-allowed-file-names:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
|
||||
- name: Check Allowed File Names
|
||||
run: |
|
||||
NOT_SAMPLES=$(find . -not -path '*/\.*' -type f ! \( -name '*.conf.sample' -o -name 'README.md' -o -name 'LICENSE' \))
|
||||
NOT_SAMPLES_COUNT=$(echo "${NOT_SAMPLES}" | wc -w)
|
||||
if (( NOT_SAMPLES_COUNT > 0 )); then
|
||||
echo "The following files are not allowed:"
|
||||
echo "${NOT_SAMPLES}"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
- name: Check Version Date Line Exists
|
||||
run: |
|
||||
VERSION_LINE_MISSING=$(find . -not -path '*/\.*' -type f -name '*.conf.sample' -exec grep -H -c -P '^## Version (?:19|20|21)(?:(?:[13579][26]|[02468][048])\/(?:(?:0[1-9]|1[0-2])\/(?:0[1-9]|1[0-9]|2[0-9])|(?:(?!02)(?:0[1-9]|1[0-2])\/(?:30))|(?:(?:0[13578]|1[02])\/31))|(?:[0-9]{2}\/(?:0[1-9]|1[0-2])\/(?:0[1-9]|1[0-9]|2[0-8])|(?:(?!02)(?:0[1-9]|1[0-2])\/(?:29|30))|(?:(?:0[13578]|1[02])\/31)))$' {} \; | grep 0$ | cut -d':' -f1)
|
||||
VERSION_LINE_MISSING_COUNT=$(echo "${VERSION_LINE_MISSING}" | wc -w)
|
||||
if (( VERSION_LINE_MISSING_COUNT > 0 )); then
|
||||
echo "The following files are missing the version date line:"
|
||||
echo "${VERSION_LINE_MISSING}"
|
||||
exit 1
|
||||
fi
|
Loading…
Add table
Add a link
Reference in a new issue