Skip to content

Commit

Permalink
Update workflows to only create badges on main
Browse files Browse the repository at this point in the history
  • Loading branch information
jessicasyu committed Jun 5, 2024
1 parent 1a29358 commit 3342c08
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ jobs:
clean: false

result:
if: ${{ always() }}
if: ${{ always() && github.ref == 'refs/heads/main' }}

runs-on: ubuntu-latest

Expand Down
20 changes: 20 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,26 @@ jobs:
source .venv/bin/activate
mypy src
result:
if: ${{ always() && github.ref == 'refs/heads/main' }}

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]
Expand Down

0 comments on commit 3342c08

Please sign in to comment.