formatting fixes #150
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: lint | |
on: [push] | |
jobs: | |
lint: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout the repo | |
uses: actions/checkout@v2 | |
with: | |
persist-credentials: false | |
fetch-depth: 0 | |
- name: Lint code base | |
uses: dbelyaev/[email protected] | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
reporter: github-check | |
checkstyle_config: .github/config/checks.xml | |
fail_on_error: true | |
lint_result: | |
if: ${{ always() && (github.ref == 'refs/heads/main' || github.ref == 'refs/heads/develop') }} | |
runs-on: ubuntu-latest | |
needs: [lint] | |
steps: | |
- name: Checkout the repo | |
uses: actions/checkout@v4 | |
- name: Get lint result | |
run: | | |
if [[ ${{ needs.lint.result }} == "success" || ${{ needs.lint.result }} == "skipped" ]]; then | |
exit 0 | |
else | |
exit 1 | |
fi | |
- name: Generate passing badge | |
if: success() | |
uses: knightdave/[email protected] | |
with: | |
file: docs/_badges/lint.svg | |
label: lint | |
value: passing | |
color: green | |
template: docs/_badges/template.svg | |
overwrite: true | |
- name: Generate failing badge | |
if: failure() | |
uses: knightdave/[email protected] | |
with: | |
file: docs/_badges/lint.svg | |
label: lint | |
value: failing | |
color: red | |
template: docs/_badges/template.svg | |
overwrite: true | |
- name: Publish badge | |
if: success() || failure() | |
uses: JamesIves/github-pages-deploy-action@v4 | |
with: | |
branch: gh-pages | |
folder: docs/_badges | |
target-folder: _badges | |
clean: false |