File tree Expand file tree Collapse file tree 1 file changed +1
-36
lines changed Expand file tree Collapse file tree 1 file changed +1
-36
lines changed Original file line number Diff line number Diff line change @@ -243,39 +243,4 @@ jobs:
243243 bot-email : ${{ secrets.PYANSYS_CI_BOT_EMAIL }}
244244 doc-artifact-name : HTML-doc-ansys-dpf-post.zip
245245 decompress-artifact : true
246-
247- sync-main-with-master :
248- name : " Sync main with master"
249- if : ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }}
250- runs-on : ubuntu-latest
251- steps :
252- - name : " Install Git and clone project"
253- uses : actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
254- with :
255- token : ${{ secrets.MIGRATION_PAT }}
256- fetch-depth : 0
257-
258- - name : " Verify that main is the default branch"
259- shell : bash
260- run : |
261- head_branch=$(git remote show origin | grep "HEAD branch:")
262- main_branch=${head_branch#*: }
263-
264- if [[ $main_branch != "main" ]]; then
265- echo "The default branch is not 'main'. It is set to '$main_branch'."
266- echo "Please set 'main' as the default branch in the repository settings."
267- exit 1
268- fi
269-
270- - name : " Configure git username and email"
271- shell : bash
272- run : |
273- git config --global user.name "${{ secrets.PYANSYS_CI_BOT_USERNAME }}"
274- git config --global user.email "${{ secrets.PYANSYS_CI_BOT_EMAIL }}"
275-
276- - name : " Sync main to master"
277- shell : bash
278- run : |
279- git checkout master
280- git reset --hard main
281- git push
246+
You can’t perform that action at this time.
0 commit comments