Skip to content

Commit

Permalink
Do not automatically create pip-tools pull requests on forks of this …
Browse files Browse the repository at this point in the history
…repo (#11738)

Currently, this GitHub Action creates new pull requests on the forks of
all contributors. Let's make sure that the job only creates pull
requests
```yaml
if: github.repository_owner == 'readthedocs'
```

https://docs.github.com/en/actions/writing-workflows/choosing-what-your-workflow-does/accessing-contextual-information-about-workflow-runs#github-context
  • Loading branch information
cclauss authored Nov 4, 2024
1 parent 7120315 commit 7198d3d
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions .github/workflows/pip-tools.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Action to run pip-compile weekly and create a Pull Request with the changes.
# Althought GitHub says that pip-compile is supported by dependabot, we couldn't make it work together.
# Although GitHub says that pip-compile is supported by dependabot, we couldn't make it work together.
# That's why this action exists.
# If we ever find the proper configuration for dependabot+pip-compile,
# we can delete this action.
Expand All @@ -22,6 +22,7 @@ jobs:

name: Update dependencies
runs-on: ubuntu-latest
if: github.repository_owner == 'readthedocs' # do not run this job on forks
steps:
- uses: actions/checkout@v4
- name: Update submodules
Expand All @@ -34,7 +35,7 @@ jobs:
run: sudo apt-get install libpq-dev

- name: Install piptools and invoke
run: python -m pip install -U pip-tools invoke
run: python -m pip install --upgrade pip-tools invoke

- name: Update dependencies from requirements/*.txt
run: invoke requirements.update
Expand Down

0 comments on commit 7198d3d

Please sign in to comment.