From 90e92463b3c4aec5eb305a9f974fdff28fec2a6d Mon Sep 17 00:00:00 2001 From: William Harrison Date: Sat, 27 May 2023 11:32:15 +0800 Subject: [PATCH] feat: remove workflow skipping --- .github/workflows/validation.yml | 42 -------------------------------- 1 file changed, 42 deletions(-) diff --git a/.github/workflows/validation.yml b/.github/workflows/validation.yml index 9960c01..8a1b5b9 100644 --- a/.github/workflows/validation.yml +++ b/.github/workflows/validation.yml @@ -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$"