From 91e68e3cbe0bf308ee83e3db97e64a484a31fd5d Mon Sep 17 00:00:00 2001 From: Candace Savonen Date: Thu, 21 Sep 2023 08:40:53 -0400 Subject: [PATCH] Try to fix --- .github/workflows/check-url.yml | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/.github/workflows/check-url.yml b/.github/workflows/check-url.yml index fd978538..d55e51cf 100644 --- a/.github/workflows/check-url.yml +++ b/.github/workflows/check-url.yml @@ -72,8 +72,17 @@ jobs: echo "error_url=https://github.com/${GITHUB_REPOSITORY}/blob/$branch_name/${{ steps.check_results.outputs.report_path }}" >> $GITHUB_OUTPUT shell: bash + - name: Stop if failure + if: steps.check_results.outcome == 'failure' + run: exit 1 + + - name: Print out error variables + run: | + echo ${{ steps.check-report.outputs.error_url }} + echo ${{ steps.check-report.outputs.error_num }} + - name: If too many URL errors, then make an issue - if: ${{ steps.check-report.outputs.error_num > 1 }} + if: ${{ steps.check-report.outputs.error_num => 1 }} uses: JasonEtco/create-an-issue@v2 with: filename: .github/ISSUE_TEMPLATE/url-error.md @@ -82,12 +91,8 @@ jobs: FILE_URL: ${{ steps.check-report.outputs.error_url }} ERROR_NUM: ${{ steps.check-report.outputs.error_num }} - - name: Stop if failure - if: steps.check_results.outcome == 'failure' - run: exit 1 - - name: If no URL errors than delete the branch we made - if: ${{ steps.check-report.outputs.error_num <= 1 }} + if: ${{ steps.check-report.outputs.error_num < 1 }} run: | git config --system --add safe.directory "$GITHUB_WORKSPACE" git push origin --delete preview-${{ github.event.pull_request.number }} || echo "No branch to delete"