mirror of
https://github.com/tiennm99/old-free-domains.git
synced 2026-10-15 16:15:05 +00:00
feat: remove workflow skipping
This commit is contained in:
1 parent
23896025b6
commit
90e92463b3
1 file changed
-42
@@ -23,25 +23,7 @@ jobs:
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
- name: Find Files
|
||||
id: find_files
|
||||
run: |
|
||||
if [[ ${{ github.event_name }} == 'pull_request' ]]; then
|
||||
files=$(curl -s -H "Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}" \
|
||||
"https://api.github.com/repos/${{ github.repository }}/pulls/${{ github.event.pull_request.number }}/files?per_page=100" \
|
||||
| jq -r '.[] | select(.status == "added" or .status == "modified") | .filename' \
|
||||
| grep 'domains/.*\.json$')
|
||||
else
|
||||
files=$(git diff --name-only --diff-filter=AM "domains/" | grep '\.json$' || echo '')
|
||||
fi
|
||||
|
||||
if [[ -z $files ]]; then
|
||||
echo "Skipping job as there are no files to analyse."
|
||||
echo "::set-output name=skip::true"
|
||||
fi
|
||||
|
||||
- name: DNSControl Check
|
||||
if: ${{ !steps.find_files.outputs.skip }}
|
||||
uses: koenrh/dnscontrol-action@v3
|
||||
with:
|
||||
args: check
|
||||
@@ -76,15 +58,9 @@ jobs:
|
||||
files=$(git diff --name-only --diff-filter=AM "domains/" | grep '\.json$' || echo '')
|
||||
fi
|
||||
|
||||
if [[ -z $files ]]; then
|
||||
echo "Skipping job as there are no files to analyse."
|
||||
echo "::set-output name=skip::true"
|
||||
fi
|
||||
|
||||
echo "::set-output name=files::$files"
|
||||
|
||||
- name: Validate Emails
|
||||
if: ${{ !steps.find_files.outputs.skip }}
|
||||
run: |
|
||||
for file in ${{ steps.find_files.outputs.files }}; do
|
||||
filename=$(basename "$file")
|
||||
@@ -109,25 +85,7 @@ jobs:
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
- name: Find Files
|
||||
id: find_files
|
||||
run: |
|
||||
if [[ ${{ github.event_name }} == 'pull_request' ]]; then
|
||||
files=$(curl -s -H "Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}" \
|
||||
"https://api.github.com/repos/${{ github.repository }}/pulls/${{ github.event.pull_request.number }}/files?per_page=100" \
|
||||
| jq -r '.[] | select(.status == "added" or .status == "modified") | .filename' \
|
||||
| grep 'domains/.*\.json$')
|
||||
else
|
||||
files=$(git diff --name-only --diff-filter=AM "domains/" | grep '\.json$' || echo '')
|
||||
fi
|
||||
|
||||
if [[ -z $files ]]; then
|
||||
echo "Skipping job as there are no files to analyse."
|
||||
echo "::set-output name=skip::true"
|
||||
fi
|
||||
|
||||
- name: JSON Syntax Check
|
||||
if: ${{ !steps.find_files.outputs.skip }}
|
||||
uses: limitusus/json-syntax-check@v1
|
||||
with:
|
||||
pattern: "\\.json$"
|
||||
|
||||
Reference in new issue
Block a user