Skip to content

Commit 7198d3d

Browse files
authored
Do not automatically create pip-tools pull requests on forks of this 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
1 parent 7120315 commit 7198d3d

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

.github/workflows/pip-tools.yaml

+3-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Action to run pip-compile weekly and create a Pull Request with the changes.
2-
# Althought GitHub says that pip-compile is supported by dependabot, we couldn't make it work together.
2+
# Although GitHub says that pip-compile is supported by dependabot, we couldn't make it work together.
33
# That's why this action exists.
44
# If we ever find the proper configuration for dependabot+pip-compile,
55
# we can delete this action.
@@ -22,6 +22,7 @@ jobs:
2222

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

3637
- name: Install piptools and invoke
37-
run: python -m pip install -U pip-tools invoke
38+
run: python -m pip install --upgrade pip-tools invoke
3839

3940
- name: Update dependencies from requirements/*.txt
4041
run: invoke requirements.update

0 commit comments

Comments
 (0)