From 3e5b5a51d1c36d7436d94461f99a70844ffdc4f2 Mon Sep 17 00:00:00 2001 From: Leithen Date: Tue, 19 Nov 2024 14:22:42 -0700 Subject: [PATCH] Skip check if file is not .yml or .md (#11760) --- .github/workflows/check-urls.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/check-urls.yml b/.github/workflows/check-urls.yml index fdaa9bdcc..3b3e37150 100644 --- a/.github/workflows/check-urls.yml +++ b/.github/workflows/check-urls.yml @@ -74,14 +74,17 @@ jobs: fail-fast: false steps: - name: Checkout + if: ${{ endsWith(matrix.file, '.yml') || endsWith(matrix.file, '.md') }} uses: actions/checkout@v4 with: fetch-depth: ${{ needs.get-changed-files.outputs.fetch-depth }} - name: Setup Ruby v2.6 + if: ${{ endsWith(matrix.file, '.yml') || endsWith(matrix.file, '.md') }} uses: ruby/setup-ruby@v1 with: ruby-version: 2.6 - name: Install awesome_bot + if: ${{ endsWith(matrix.file, '.yml') || endsWith(matrix.file, '.md') }} run: | gem install awesome_bot - name: Set output @@ -101,6 +104,7 @@ jobs: echo "FILEPATH=${file_path}" >> "$GITHUB_OUTPUT" - name: "Check URLs of file: ${{ matrix.file }}" + if: ${{ endsWith(matrix.file, '.yml') || endsWith(matrix.file, '.md') }} run: | awesome_bot "${{ matrix.file }}" --allow-redirect --allow-dupe --allow-ssl || true; - uses: actions/upload-artifact@v4