From 98221fdda5ac5a71bc686cfad78c68767bb6b6b3 Mon Sep 17 00:00:00 2001 From: lowlighter <22963968+lowlighter@users.noreply.github.com> Date: Thu, 29 Apr 2021 00:07:09 +0200 Subject: [PATCH] Auto-format in workflow --- .github/pull_request_template.md | 5 ++++- .github/workflows/workflow.yml | 10 +++++----- 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md index a67bd0e0d81..08b0cb2f03f 100644 --- a/.github/pull_request_template.md +++ b/.github/pull_request_template.md @@ -6,7 +6,10 @@ Please: - Read CONTRIBUTING.md first - Check you're not duplicating another existing pull request - - Add correct labeling - Provide a clear and concise description + Note that: + - Your code will be automatically formatted by github-actions + - Head branches are automatically deleted when merged + --> diff --git a/.github/workflows/workflow.yml b/.github/workflows/workflow.yml index e95fc0fe7fa..dfedb7f75fd 100644 --- a/.github/workflows/workflow.yml +++ b/.github/workflows/workflow.yml @@ -82,16 +82,16 @@ jobs: - name: Format code run: npm run fmt - name: Publish formatted code - run: git status - # run: | - # git add --update - # git push + if: github.event_name == 'pull_request' && github.ref != 'refs/heads/master' + 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, format ] + needs: [ format ] if: github.event_name == 'push' && github.ref == 'refs/heads/master' steps: - name: Checkout repository