Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 12 additions & 12 deletions .github/workflows/cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@ jobs:
build-and-push-artifacts:
name: Build and push artifacts for Python ${{ matrix.python_version }}
runs-on: ubuntu-latest
# Only run for base repo, not forks
if: github.event.pull_request.head.repo.full_name == github.repository || github.event_name != 'pull_request'
# Only run for base repo, not forks or dependabot
if: (github.event.pull_request.head.repo.full_name == github.repository || github.event_name != 'pull_request') && github.actor != 'dependabot[bot]'
strategy:
fail-fast: false
matrix:
Expand Down Expand Up @@ -122,8 +122,8 @@ jobs:
name: All artifacts pushed
runs-on: ubuntu-latest
needs: build-and-push-artifacts
# Only run if the build job ran (i.e., not for forks)
if: always() && (github.event.pull_request.head.repo.full_name == github.repository || github.event_name != 'pull_request')
# Only run if the build job ran (i.e., not for forks or dependabot)
if: always() && (github.event.pull_request.head.repo.full_name == github.repository || github.event_name != 'pull_request') && github.actor != 'dependabot[bot]'
steps:
- name: Check matrix job results
env:
Expand All @@ -144,8 +144,8 @@ jobs:
publish-python-package:
name: Publish Python package
runs-on: ubuntu-latest
# Only run for base repo, not forks
if: github.event.pull_request.head.repo.full_name == github.repository || github.event_name != 'pull_request'
# Only run for base repo, not forks or dependabot
if: (github.event.pull_request.head.repo.full_name == github.repository || github.event_name != 'pull_request') && github.actor != 'dependabot[bot]'
outputs:
version: ${{ steps.build.outputs.version }}
permissions:
Expand Down Expand Up @@ -284,8 +284,8 @@ jobs:
name: Publish to PyPI
runs-on: ubuntu-latest
needs: publish-python-package
# Only run for base repo when a new tag is created
if: (github.event.pull_request.head.repo.full_name == github.repository || github.event_name != 'pull_request') && startsWith(github.ref, 'refs/tags/')
# Only run for base repo when a new tag is created, not for dependabot
if: (github.event.pull_request.head.repo.full_name == github.repository || github.event_name != 'pull_request') && startsWith(github.ref, 'refs/tags/') && github.actor != 'dependabot[bot]'
permissions:
contents: read
id-token: write
Expand All @@ -308,8 +308,8 @@ jobs:
name: Deploy review app
runs-on: ubuntu-latest
needs: build-and-push-artifacts-status
# Only run for base repo PRs, not forks
if: github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == github.repository
# Only run for base repo PRs, not forks or dependabot
if: github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == github.repository && github.actor != 'dependabot[bot]'
steps:
- name: Checkout code
uses: actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955 # v4
Expand Down Expand Up @@ -353,8 +353,8 @@ jobs:
name: Jupyter for local
runs-on: ubuntu-latest
needs: build-and-push-artifacts-status
# Only run for base repo, not forks
if: github.event.pull_request.head.repo.full_name == github.repository || github.event_name != 'pull_request'
# Only run for base repo, not forks or dependabot
if: (github.event.pull_request.head.repo.full_name == github.repository || github.event_name != 'pull_request') && github.actor != 'dependabot[bot]'
permissions:
id-token: write
contents: read
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -217,6 +217,8 @@ jobs:
gitleaks:
name: Gitleaks check
runs-on: ubuntu-latest
# Only run for base repo, not forks
if: github.event.pull_request.head.repo.full_name == github.repository || github.event_name != 'pull_request'
steps:
- name: Checkout code
uses: actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955 # v4
Expand Down