diff --git a/.github/workflows/push-checks-workflow.yml b/.github/workflows/push-checks-workflow.yml new file mode 100644 index 0000000..04b6b23 --- /dev/null +++ b/.github/workflows/push-checks-workflow.yml @@ -0,0 +1,60 @@ +name: 🚀 Push Checks Workflow +on: + push: + branches-ignore: + - main + workflow_dispatch: + +jobs: + checks: + name: 🫸 Push Checks + runs-on: ubuntu-latest + + steps: + - name: 📥 Checkout code + uses: actions/checkout@v4 + with: + fetch-depth: 0 + + - name: 📦 Install pnpm + uses: pnpm/action-setup@v3 + with: + version: 8 + run_install: false + + - name: 🛠️ Set up Node.js + uses: actions/setup-node@v4 + with: + node-version: current + cache: "pnpm" + + - name: 🧩 Install dependencies + run: pnpm install --frozen-lockfile --prod=false + + - name: 👣 Retrieve Git REF + run: echo "GIT_REF=$(git rev-parse origin/main)" >> $GITHUB_ENV + + - name: 🐛 Debug Git REF + run: echo "${{ env.GIT_REF }}" + + - name: 💅 Format code (with Biome) + continue-on-error: true + run: | + pnpm exec biome check \ + --apply \ + --changed \ + --since=${{ env.GIT_REF }} \ + --formatter-enabled=true \ + --linter-enabled=false \ + --organize-imports-enabled=true \ + --vcs-enabled=true \ + --vcs-use-ignore-file=true \ + --no-errors-on-unmatched \ + --diagnostic-level=info \ + --log-level=warn \ + . + + - name: 🚦 Git Auto Commit Lint fixes (with Biome) + uses: stefanzweifel/git-auto-commit-action@v5.0.0 + with: + commit_message: "chore: lint code with Biome [skip ci]"