From d529c7695fc0ebbdfe4126f70ecf2100f1a8fe6a Mon Sep 17 00:00:00 2001 From: Ethan Bickel Date: Mon, 14 Oct 2024 09:17:25 -0500 Subject: [PATCH] combine scripts --- .github/workflows/generateCheck.sh | 4 +++- .github/workflows/prettierCheck.yml | 9 +-------- 2 files changed, 4 insertions(+), 9 deletions(-) diff --git a/.github/workflows/generateCheck.sh b/.github/workflows/generateCheck.sh index 75e2c76..02687c2 100755 --- a/.github/workflows/generateCheck.sh +++ b/.github/workflows/generateCheck.sh @@ -1,4 +1,6 @@ -if [ -z "${files}" ]; then +files=$(npx prettier . -l) +status=$? +if [ status == 0 ]; then echo "## Formatting Check passed 🥳" >>$GITHUB_STEP_SUMMARY echo "All files are formatted correctly" >>$GITHUB_STEP_SUMMARY exit 0 diff --git a/.github/workflows/prettierCheck.yml b/.github/workflows/prettierCheck.yml index c4e7c30..d248dbe 100644 --- a/.github/workflows/prettierCheck.yml +++ b/.github/workflows/prettierCheck.yml @@ -12,12 +12,5 @@ jobs: cache: 'npm' - name: Run npm install run: npm ci - - name: Run prettier - id: prettier - continue-on-error: true - run: | - export files=`npx prettier . -l` - - name: generate errors/summary + - name: Run prettier & generate problems run: .github/workflows/generateCheck.sh - env: - status: ${{ steps.prettier.outcome }}