diff --git a/.github/workflows/update_paddle_submodule.yml b/.github/workflows/update_paddle_submodule.yml index 64529e762a2..55ddc5a049a 100644 --- a/.github/workflows/update_paddle_submodule.yml +++ b/.github/workflows/update_paddle_submodule.yml @@ -1,7 +1,6 @@ name: Update Paddle Submodule NightlyAdd commentMore actions on: - pull_request: schedule: - cron: '0 16 * * *' workflow_dispatch: @@ -18,19 +17,18 @@ jobs: - name: Update Paddle Submodule run: | + echo "BRANCH_NAME=update-paddle-submodule-$(date +'%Y%m%d')" >> $GITHUB_ENV git config --global user.name "GitHub Actions" git config --global user.email "actions@github.com" git submodule update --remote --init - cd Paddle - git add . - git commit -m "Commit changes in Paddle submodule" - cd .. + git status git add Paddle - git commit -m "Update Paddle submodule to latest commit" || echo "No changes to commit" + git commit -m "Commit changes in Paddle submodule" - name: Create Pull Request uses: peter-evans/create-pull-request@v5 with: - branch: update-paddle-submodule + branch: ${{ env.BRANCH_NAME }} + delete-branch: true title: "Nightly Update: Paddle Submodule" body: "Automated PR to update Paddle submodule to the latest commit." commit-message: "Update Paddle submodule"