Skip to content

Commit 4c0827f

Browse files
authored
Refactor pylint workflow to improve score extraction
1 parent 6cd9646 commit 4c0827f

1 file changed

Lines changed: 7 additions & 7 deletions

File tree

.github/workflows/pylint.yml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,10 @@ jobs:
2222
run: |
2323
pylint $(git ls-files '*.py')
2424
- name: Extract score
25-
id: extract_score
26-
run: |
27-
score=$(grep "rated at" pylint-output.txt | sed -E 's/.*rated at ([0-9]+\.[0-9]+)\/10.*/\1/')
28-
echo "score=$score" >> $GITHUB_OUTPUT
29-
- name: Set badge label (optional)
30-
run: |
31-
echo "::set-output name=badge_url::https://img.shields.io/badge/pylint-${{ steps.extract_score.outputs.score }}%2F10-brightgreen"
25+
id: extract_score
26+
run: |
27+
score=$(grep "rated at" pylint-output.txt | sed -E 's/.*rated at ([0-9]+\.[0-9]+)\/10.*/\1/')
28+
echo "score=$score" >> $GITHUB_OUTPUT
29+
- name: Set badge label (optional)
30+
run: |
31+
echo "::set-output name=badge_url::https://img.shields.io/badge/pylint-${{ steps.extract_score.outputs.score }}%2F10-brightgreen"

0 commit comments

Comments
 (0)