From 0802832ab4cde533f0412b2fc3c90d58a039f4ab Mon Sep 17 00:00:00 2001 From: lowlighter <22963968+lowlighter@users.noreply.github.com> Date: Wed, 28 Apr 2021 23:12:39 +0200 Subject: [PATCH] Update workflow.yml --- .github/workflows/workflow.yml | 24 +++++++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) diff --git a/.github/workflows/workflow.yml b/.github/workflows/workflow.yml index e07af23d..86a0d0b3 100644 --- a/.github/workflows/workflow.yml +++ b/.github/workflows/workflow.yml @@ -40,6 +40,10 @@ jobs: steps: - name: Checkout repository uses: actions/checkout@v2 + - name: Setup Dprint + run: curl -fsSL https://dprint.dev/install.sh | sh + - name: Format code + run: npm run fmt - name: Build lowlighter/metrics:${{ github.head_ref || 'master' }} run: docker build -t lowlighter/metrics:$(echo ${{ github.head_ref || 'master' }} | sed 's/\//-/g') . - name: Run tests @@ -61,11 +65,29 @@ jobs: - name: Analyze code uses: github/codeql-action/analyze@v1 + # Format code + format: + name: Format code + runs-on: ubuntu-latest + needs: [ build, analyze ] + steps: + - name: Checkout repository + uses: actions/checkout@v2 + - name: Setup Dprint + run: curl -fsSL https://dprint.dev/install.sh | sh + - name: Format code + run: npm run fmt + - name: Publish formatted code + run: git status + # run: | + # git add --update + # git push + # Update plugins and template indexes, along with README.md update-indexes: name: Publish rebuilt metrics indexes runs-on: ubuntu-latest - needs: [ build, analyze ] + needs: [ build, analyze, format ] if: github.event_name == 'push' && github.ref == 'refs/heads/master' steps: - name: Checkout repository