Skip to content

Commit 283db47

Browse files
committed
Fixed workflow
1 parent 864a4b3 commit 283db47

File tree

1 file changed

+6
-9
lines changed

1 file changed

+6
-9
lines changed

.github/workflows/python-package.yml

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -88,20 +88,17 @@ jobs:
8888
id: changed_files
8989
with:
9090
files: ${{ env.cov_badge_path }}
91-
- name: Commit files
91+
- name: Push coverage badge
9292
if: steps.changed_files.outputs.files_changed == 'true'
9393
run: |
9494
git config --local user.email "github-actions[bot]@users.noreply.github.com"
9595
git config --local user.name "github-actions[bot]"
96+
git fetch origin
97+
git checkout coverage-badge || git checkout -b coverage-badge
9698
git add $cov_badge_path
97-
git commit -m "Updated coverage.svg"
98-
- name: Push changes
99-
if: steps.changed_files.outputs.files_changed == 'true'
100-
uses: ad-m/github-push-action@master
101-
with:
102-
branch: ${{ github.head_ref || github.ref_name }}
103-
force: true
104-
github_token: ${{ secrets.GITHUB_TOKEN }}
99+
git diff --cached --quiet && exit 0
100+
git commit -m "Update coverage badge"
101+
git push origin coverage-badge --force
105102
deploy:
106103
runs-on: ubuntu-latest
107104
needs: [prepare, coverage]

0 commit comments

Comments
 (0)