Skip to content

Commit 28eaf24

Browse files
committed
better workflow triggers
1 parent 21beab4 commit 28eaf24

3 files changed

Lines changed: 4 additions & 2 deletions

File tree

.github/workflows/bot.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ jobs:
4545
delete-branch: true
4646

4747
auto-merge:
48-
if: ${{ github.event_name == 'pull_request' && (github.event.pull_request.user.login == 'dependabot[bot]' || github.event.pull_request.user.login == 'pre-commit-ci[bot]' || github.event.pull_request.user.login == 'uv-lock-upgrader[bot]') }}
48+
if: ${{ github.repository == 'mscheltienne/template-python' && github.event_name == 'pull_request' && (github.event.pull_request.user.login == 'dependabot[bot]' || github.event.pull_request.user.login == 'pre-commit-ci[bot]' || github.event.pull_request.user.login == 'uv-lock-upgrader[bot]') }}
4949
runs-on: ubuntu-latest
5050
steps:
5151
- name: Enable auto-merge for bot PRs

.github/workflows/doc.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ jobs:
3131
path: ./doc/_build/html
3232

3333
deploy:
34-
if: ${{ github.event_name == 'push' }}
34+
if: ${{ github.repository == 'mscheltienne/template-python' && github.event_name == 'push' }}
3535
needs: build
3636
timeout-minutes: 10
3737
runs-on: ubuntu-latest

.github/workflows/pytest.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ jobs:
3535
- run: template sys-info --developer
3636
- run: pytest template --cov=template --cov-report=xml --cov-config=pyproject.toml
3737
- uses: codecov/codecov-action@v5
38+
if: ${{ github.repository == 'mscheltienne/template-python' }}
3839
with:
3940
token: ${{ secrets.CODECOV_TOKEN }}
4041

@@ -61,5 +62,6 @@ jobs:
6162
- run: template sys-info --developer
6263
- run: pytest template --cov=template --cov-report=xml --cov-config=pyproject.toml
6364
- uses: codecov/codecov-action@v5
65+
if: ${{ github.repository == 'mscheltienne/template-python' }}
6466
with:
6567
token: ${{ secrets.CODECOV_TOKEN }}

0 commit comments

Comments
 (0)