Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Update site-policy-sync.yml
Passes closed PR title as pushed commit message and assigns authorship to site-policy-bot
  • Loading branch information
pcihon authored Apr 5, 2021
commit d2172e04001f5f67845b496517a12e3e2e9e67e9
15 changes: 3 additions & 12 deletions .github/workflows/site-policy-sync.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,18 +31,9 @@ jobs:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f
# Sets commit message
- name: default message
run: |
echo "MESSAGE=Automatic sync with changes from GitHub Docs" >> $GITHUB_ENV
- name: custom message
if: contains(github.event.pull_request.body, '### Public summary for site-policy changes:')
run: |
NEW=$(echo $MESSAGE | sed -e ':a' -e 'N' -e '$!ba' -e 's/\n/ /g')
NEW2=$(echo $NEW | sed 's/^.*### Public summary for site-policy changes://')
echo MESSAGE=$NEW2 >> $GITHUB_ENV
env:
MESSAGE: >
${{github.event.pull_request.body}}
echo "MESSAGE=${{github.event.pull_request.title}}" >> $GITHUB_ENV

# Pushes to other repo
- name: Push folder to another repository
Expand All @@ -55,6 +46,6 @@ jobs:
destination_branch: 'main'
destination_branch_create: 'repo-sync'
destination_folder: 'Policies'
user_email: 'pcihon@users.noreply.github.com'
user_name: 'pcihon'
user_email: 'site-policy-bot@users.noreply.github.com'
user_name: 'site-policy-bot'
commit_msg: '${{ env.MESSAGE }}'