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
Next Next commit
Update site-policy-sync.yml
  • Loading branch information
pcihon authored Mar 24, 2021
commit ffc7dcec2902dd4844f2257cc45a2ba0dfe97064
21 changes: 17 additions & 4 deletions .github/workflows/site-policy-sync.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
name: site-policy-sync

# **What it does**: Updates our site policy docs when changes happen to site policy.
# **Why we have it**: We want up to date site policy docs.
# **Who does it impact**: Site policy team.
# **What it does**: Updates our site-policy repo when changes happen to site policy docs.
# **Why we have it**: We want keep site-policy repo up to date.
# **Who does it impact**: Site-policy team.

# Controls when the action will run.
on:
Expand Down Expand Up @@ -30,6 +30,19 @@ jobs:
steps:
# 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}}

# Pushes to other repo
- name: Push folder to another repository
Expand All @@ -44,4 +57,4 @@ jobs:
destination_folder: 'Policies'
user_email: '[email protected]'
user_name: 'pcihon'
commit_msg: 'Automatic sync from GitHub Docs.'
commit_msg: '${{ env.MESSAGE }}'