CI: allow 1 retry for first time contributor and fork and skip sync lfs on fork PRs (#646)

* Update workflow condition to skip forked PRs during sync

This change ensures the LFS maintenance workflow does not run for pull requests originating from forked repositories. It enhances efficiency by avoiding unnecessary sync actions in these cases.

* Modified retry conditions in GitHub workflow file

Adjusted the retry conditions in the GitHub workflow setup file. The updated condition allows for a second attempt if the pull request originator is a 'FIRST_TIME_CONTRIBUTOR' from a forked repository. This modification lends more flexibility to first-time contributors by providing them with an additional chance to pass the tests.
This commit is contained in:
DevTekVE
2025-03-06 10:24:14 +01:00
committed by GitHub
parent 17d292c773
commit a51ed062ca
2 changed files with 2 additions and 2 deletions

View File

@@ -19,7 +19,7 @@ runs:
- shell: bash
name: No retries!
run: |
if [ "${{ github.run_attempt }}" -gt 1 ]; then
if [ "${{ github.run_attempt }}" -gt ${{ github.event.pull_request.head.repo.fork && github.event.pull_request.author_association == 'FIRST_TIME_CONTRIBUTOR' && 2 || 1}} ]; then
echo -e "\033[0;31m##################################################"
echo -e "\033[0;31m Retries not allowed! Fix the flaky test! "
echo -e "\033[0;31m##################################################\033[0m"