1
0
mirror of synced 2026-01-10 09:02:35 -05:00

Update site-policy-sync.yml

This commit is contained in:
Peter Cihon
2021-03-24 16:04:50 -07:00
committed by GitHub
parent ec3ee7360c
commit ffc7dcec29

View File

@@ -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:
@@ -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
@@ -44,4 +57,4 @@ jobs:
destination_folder: 'Policies'
user_email: 'pcihon@users.noreply.github.com'
user_name: 'pcihon'
commit_msg: 'Automatic sync from GitHub Docs.'
commit_msg: '${{ env.MESSAGE }}'