1- name : language- reference- documentation
1+ name : Language reference documentation
22
33on :
44 push :
@@ -14,14 +14,14 @@ permissions:
1414
1515jobs :
1616 build-and-push :
17+ name : Build reference documentation and push it
1718 permissions :
1819 contents : write # for Git to git push
19- pull-requests : write # for peter-evans/create-pull-request to create a PR
2020 runs-on : ubuntu-latest
2121 steps :
2222 - name : Get current date
2323 id : date
24- run : echo "::set-output name= date:: $(date +'%Y-%m-%d')"
24+ run : echo "date= $(date +'%Y-%m-%d')" >> $GITHUB_OUTPUT
2525
2626 - name : Git Checkout
2727 uses : actions/checkout@v3
@@ -67,26 +67,22 @@ jobs:
6767 fi
6868 cd ..
6969
70- - name : Merge changes to main
71- if : github.event_name == 'push'
72- run : |
73- cd dotty
74- git fetch origin main:main
75- git checkout main
76- git config user.name gh-actions
77- git config user.email actions@github.com
78- git merge language-reference-stable
79- cd ..
80-
81- - name : Create pull request with backport to main
82- if : github.event_name == 'push'
83- uses : peter-evans/create-pull-request@v4
70+ backport-to-main :
71+ name : Create pull request with backport to main
72+ permissions :
73+ pull-requests : write # for repo-sync/pull-request to create a PR
74+ runs-on : ubuntu-latest
75+ if : github.event_name == 'push' || github.event_name == 'workflow_dispatch'
76+ steps :
77+ - uses : actions/checkout@v3
78+ - uses : repo-sync/pull-request@v2
8479 with :
85- path : dotty
86- branch : language-reference-backport
87- labels : area:documentation
88- title : Backport changes from stable documentation branch
89- body : This pull request is created automatically after push to stable documentation branch and backports the changes
90- reviewers : pikinier20,julienrf
91- assignees : pikinier20
80+ destination_branch : main
81+ pr_label : area:documentation
82+ pr_title : Sync with the stable documentation branch
83+ pr_body : |
84+ This pull request is syncing the `main` with changes from `language-reference-stable`.
85+
86+ It was created automatically after ${{ github.event.head_commit.id }} by @${{ github.event.head_commit.author.username }}
87+ pr_assignee : ${{ github.event.head_commit.author.username }}
9288
0 commit comments