Skip to content

Commit

Permalink
add env to workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
soymintc committed Feb 6, 2025
1 parent b3c07e9 commit d6bb6e3
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions .github/workflows/integration.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ on:
branches:
- main

env:
COVERAGE_PYTHON_VERSION: "3.8" # make coverage badge only for this version

jobs:
test:
name: Test RustBam on Ubuntu with Python ${{ matrix.python-version }}
Expand Down Expand Up @@ -54,25 +57,25 @@ jobs:
- name: Coverage Badge
uses: tj-actions/coverage-badge-py@v2
if: matrix.python-version == '3.8'
if: matrix.python-version == env.COVERAGE_PYTHON_VERSION

- name: Verify Changed files
uses: tj-actions/verify-changed-files@v17
id: verify-changed-files
if: matrix.python-version == '3.8'
if: matrix.python-version == env.COVERAGE_PYTHON_VERSION
with:
files: coverage.svg

- name: Commit files
if: steps.verify-changed-files.outputs.files_changed == 'true' && matrix.python-version == '3.8'
if: steps.verify-changed-files.outputs.files_changed == 'true' && matrix.python-version == env.COVERAGE_PYTHON_VERSION
run: |
git config --local user.email "github-actions[bot]@users.noreply.github.com"
git config --local user.name "github-actions[bot]"
git add coverage.svg
git commit -m "update coverage.svg"
- name: Push changes
if: steps.verify-changed-files.outputs.files_changed == 'true' && matrix.python-version == '3.8'
if: steps.verify-changed-files.outputs.files_changed == 'true' && matrix.python-version == env.COVERAGE_PYTHON_VERSION
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.github_token }}
Expand Down

0 comments on commit d6bb6e3

Please sign in to comment.