diff --git a/.github/workflows/master_sync b/.github/workflows/master_sync new file mode 100644 index 00000000000..1d64d621ffe --- /dev/null +++ b/.github/workflows/master_sync @@ -0,0 +1,48 @@ +name: Master weekly sync + +on: + workflow_dispatch: + # schedule: + # - cron: '10 17 * * 5' + +jobs: + createPullRequest: + name: Update and create pull request + runs-on: ubuntu-latest + steps: + - name: get_date + run: echo todays_date="$(date +'%Y-%m-%d')" >> $GITHUB_ENV + + - uses: actions/checkout@v4.1.1 + with: + ref: develop + + - name: update_file + run: | + git checkout master + git merge origin/develop --ff-only + git push origin HEAD + + - name: Make changes to pull request + uses: peter-evans/create-pull-request@v6.0.4 + with: + token: ${{ secrets.GITHUB_TOKEN }} + commit-message: Update rocMLIR main ${{ env.rocmlirsha }} + committer: Github + author: ${{ github.actor }} <${{ github.actor }}@users.noreply.github.com> + signoff: false + branch: master-sync-${{ env.todays_date }} + delete-branch: true + title: 'Master Weekly Sync ${{ env.todays_date }}' + body: | + Master branch synced with develop + - Updated with changes from ${{ env.todays_date }} + - Auto-generated by [create-pull-request][1] + + [1]: https://github.com/peter-evans/create-pull-request + labels: | + dependencies + automated + skip bot checks + draft: false + base: develop diff --git a/.github/workflows/weekly_sync.yml b/.github/workflows/weekly_sync.yml index 389c2954e3e..99e2dc867b8 100644 --- a/.github/workflows/weekly_sync.yml +++ b/.github/workflows/weekly_sync.yml @@ -22,19 +22,6 @@ jobs: run: | sed -i "s/ROCm\/rocMLIR@[^ ]*/ROCm\/rocMLIR@${{ env.rocmlirsha }}/g" requirements.txt cat requirements.txt - - - #- name: action_replace - # uses: Nambers/ReplaceStringInFile@v1.3 - # with: - # path: ${{ github.workspace }}/requirements.txt - # The regex of old string, which should be replaced - # oldString: ROCmSoftwarePlatform/rocMLIR@(/S+) - # Replace old string to this string - # newString: ROCmSoftwarePlatform/rocMLIR@${{ env.rocmlirsha }} - # Print out file content after replacement - # showFileContent: true - - name: Make changes to pull request uses: peter-evans/create-pull-request@v6.0.4 @@ -55,7 +42,7 @@ jobs: [1]: https://github.com/peter-evans/create-pull-request labels: | - onnxruntime + rocMLIR dependencies automated skip bot checks