Update workflow.yml

This commit is contained in:
lowlighter
2021-04-28 23:12:39 +02:00
parent d5b8103c52
commit 0802832ab4

View File

@@ -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