4141 HEADREF : ${{ steps.pr_info.outputs.headRef }}
4242 with :
4343 # Instead of checking out the base repo, use the contributor's repo name
44- repository : $HEADREPOFULLNAME
45- ref : $HEADREF
44+ repository : ${{ env. HEADREPOFULLNAME }}
45+ ref : ${{ env. HEADREF }}
4646 # You may need fetch-depth: 0 for being able to push
4747 fetch-depth : 0
4848 token : ${{ secrets.GITHUB_TOKEN }}
5353 HEADREF : ${{ steps.pr_info.outputs.headRef }}
5454 PRNUMBER : ${{ steps.pr_info.outputs.prNumber }}
5555 run : |
56- echo "PR number: $PRNUMBER"
57- echo "Head Ref: $HEADREF"
58- echo "Head Repo Full Name: $HEADREPOFULLNAME"
56+ echo "PR number: ${{ env. PRNUMBER }} "
57+ echo "Head Ref: ${{ env. HEADREF }} "
58+ echo "Head Repo Full Name: ${{ env. HEADREPOFULLNAME }} "
5959
6060 - name : Set up Python
6161 uses : actions/setup-python@v4
6464 run : |
6565 pip install .[quality]
6666
67- - name: Download Makefile from main branch
68- run: |
69- curl -o main_Makefile https://raw.githubusercontent.com/huggingface/diffusers/main/Makefile
67+ - name : Download Makefile from main branch
68+ run : |
69+ curl -o main_Makefile https://raw.githubusercontent.com/huggingface/diffusers/main/Makefile
7070
7171 - name : Compare Makefiles
7272 run : |
7575 exit 1
7676 fi
7777 echo "No changes in Makefile. Proceeding..."
78+ rm -rf main_Makefile
7879
7980 - name : Run make style and make quality
8081 run : |
@@ -88,19 +89,20 @@ jobs:
8889 PRNUMBER : ${{ steps.pr_info.outputs.prNumber }}
8990 GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
9091 run : |
92+ echo "HEADREPOFULLNAME: ${{ env.HEADREPOFULLNAME }}, HEADREF: ${{ env.HEADREF }}"
9193 # Configure git with the Actions bot user
9294 git config user.name "github-actions[bot]"
9395 git config user.email "github-actions[bot]@users.noreply.github.com"
9496
9597 # Make sure your 'origin' remote is set to the contributor's fork
96- git remote set-url origin "https://x-access-token:${GITHUB_TOKEN}@github.com/${{ steps.commit_and_push. env.HEADREPOFULLNAME }}.git"
98+ git remote set-url origin "https://x-access-token:${GITHUB_TOKEN}@github.com/${{ env.HEADREPOFULLNAME }}.git"
9799
98100 # If there are changes after running style/quality, commit them
99101 if [ -n "$(git status --porcelain)" ]; then
100102 git add .
101103 git commit -m "Apply style fixes"
102104 # Push to the original contributor's forked branch
103- git push origin HEAD:${{ steps.commit_and_push. env.HEADREF }}
105+ git push origin HEAD:${{ env.HEADREF }}
104106 echo "changes_pushed=true" >> $GITHUB_OUTPUT
105107 else
106108 echo "No changes to commit."
0 commit comments