Skip to content

Commit 3db47e0

Browse files
committed
perf: only update parent requirements on 1st run attempt
1 parent 31e913b commit 3db47e0

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

.github/workflows/pi_build.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -164,6 +164,7 @@ jobs:
164164
git pull origin ${{ env.HEAD_REF }} || true
165165
166166
- name: Update parent requirements
167+
if: github.run_attempt == 1
167168
run: |
168169
cd ${{ github.workspace }}/${{ matrix.app }}
169170
REQUIREMENTS_FILES=$(ls requirements/*.txt)
@@ -198,8 +199,8 @@ jobs:
198199
fi
199200
200201
git add requirements/*.txt ${{ env.DOCKERFILE }}
201-
if [ -f "dev.${{ env.DOCKERFILE }}" ]; then git add dev.${{ env.DOCKERFILE }}; fi
202-
if [ -f "gpu.${{ env.DOCKERFILE }}" ]; then git add gpu.${{ env.DOCKERFILE }}; fi
202+
git add dev.${{ env.DOCKERFILE }} || true
203+
git add gpu.${{ env.DOCKERFILE }} || true
203204
git commit -m "ci: update requirements and Dockerfile" || true
204205
git push origin ${{ env.HEAD_REF }} || true
205206
echo "::notice::${{ matrix.app }} - updated requirement files and ${{ env.DOCKERFILE }}s"

0 commit comments

Comments
 (0)