Skip to content

Commit d2c6d47

Browse files
khxuOctomergergracepark
authored
add workflow_dispatch to if condition (github#22732)
* add workflow_dispatch to if condition * print PR_TITLE Co-authored-by: Octomerger Bot <63058869+Octomerger@users.noreply.github.com> Co-authored-by: Grace Park <gracepark@github.com>
1 parent a6e021a commit d2c6d47

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

.github/workflows/site-policy-sync.yml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,7 @@ on:
1919
jobs:
2020
sync:
2121
name: Get the latest docs
22-
if: >-
23-
github.event.pull_request.merged == true &&
24-
github.repository == 'github/docs-internal'
22+
if: github.event_name == 'workflow_dispatch' || (github.event.pull_request.merged == true && github.repository == 'github/docs-internal')
2523
runs-on: ubuntu-latest
2624
permissions:
2725
contents: write
@@ -49,6 +47,7 @@ jobs:
4947
git checkout -b automated-sync-$GITHUB_RUN_ID
5048
git add .
5149
PR_TITLE=${{ github.event.pull_request.title }}
50+
echo PR_TITLE: $PR_TITLE
5251
[[ ! -z $PR_TITLE ]] && DESCRIPTION="${PR_TITLE}" || DESCRIPTION="Update manually triggered by workflow"
5352
echo "DESCRIPTION=$DESCRIPTION" >> $GITHUB_ENV
5453
git commit -m "$(echo $DESCRIPTION)"

0 commit comments

Comments
 (0)