Skip to content

Commit 31ffa7e

Browse files
authored
Merge pull request #1398 from jiridanek/jd_parallel_locking
Run the pipfile.lock update github action in parallel over Python versions
2 parents bdcb30c + 62428f7 commit 31ffa7e

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

.github/workflows/piplock-renewal.yaml

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,6 @@ jobs:
4040
cancel-in-progress: false
4141
strategy:
4242
fail-fast: false
43-
max-parallel: 1
4443
matrix:
4544
python-version: >-
4645
${{ fromJSON( github.event.inputs.python_version || '["3.11", "3.12"]' ) }}
@@ -74,8 +73,15 @@ jobs:
7473
run: |
7574
make refresh-pipfilelock-files PYTHON_VERSION=${{ matrix.python-version }} INCLUDE_OPT_DIRS=${{ env.INCLUDE_OPT_DIRS }}
7675
77-
- name: Push the changes back to the branch
76+
- name: Pull latest changes safely
7877
run: |
7978
git add .
80-
git commit -m "Update Pipfile.lock files by piplock-renewal.yaml action"
79+
git stash push -m "pre-pull-stash" || true
80+
git pull --rebase origin ${{ env.BRANCH }}
81+
git stash pop || true
82+
83+
- name: Commit and push changes (if any)
84+
run: |
85+
git add .
86+
git diff --cached --quiet && echo "No changes to commit." || git commit -m "Update Pipfile.lock for Python ${{ matrix.python-version }}"
8187
git push origin ${{ env.BRANCH }}

0 commit comments

Comments
 (0)