File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11name : site-policy-sync
22
3- # **What it does**: Updates our site policy docs when changes happen to site policy.
4- # **Why we have it**: We want up to date site policy docs .
5- # **Who does it impact**: Site policy team.
3+ # **What it does**: Updates our site- policy repo when changes happen to site policy docs .
4+ # **Why we have it**: We want keep site-policy repo up to date .
5+ # **Who does it impact**: Site- policy team.
66
77# Controls when the action will run.
88on :
3030 steps :
3131 # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
3232 - uses : actions/checkout@5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f
33+ # Sets commit message
34+ - name : default message
35+ run : |
36+ echo "MESSAGE=Automatic sync with changes from GitHub Docs" >> $GITHUB_ENV
37+ - name : custom message
38+ if : contains(github.event.pull_request.body, '### Public summary for site-policy changes:')
39+ run : |
40+ NEW=$(echo $MESSAGE | sed -e ':a' -e 'N' -e '$!ba' -e 's/\n/ /g')
41+ NEW2=$(echo $NEW | sed 's/^.*### Public summary for site-policy changes://')
42+ echo MESSAGE=$NEW2 >> $GITHUB_ENV
43+ env :
44+ MESSAGE : >
45+ ${{github.event.pull_request.body}}
3346
3447 # Pushes to other repo
3548 - name : Push folder to another repository
4457 destination_folder : ' Policies'
4558 user_email : ' pcihon@users.noreply.github.com'
4659 user_name : ' pcihon'
47- commit_msg : ' Automatic sync from GitHub Docs. '
60+ commit_msg : ' ${{ env.MESSAGE }} '
You can’t perform that action at this time.
0 commit comments