* Update site-policy-sync.yml * Update allowed-actions.js Co-authored-by: Kevin Heis <heiskr@users.noreply.github.com>
44 lines
1.5 KiB
YAML
44 lines
1.5 KiB
YAML
name: site-policy-sync
|
|
|
|
# Controls when the action will run.
|
|
on:
|
|
# Triggers the workflow pull requests merged to the main branch
|
|
pull_request:
|
|
branches:
|
|
- main
|
|
types:
|
|
- closed
|
|
paths:
|
|
- 'content/github/site-policy/**'
|
|
|
|
# Allows you to run this workflow manually from the Actions tab
|
|
workflow_dispatch:
|
|
|
|
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
|
|
jobs:
|
|
# This workflow contains a single job called "build"
|
|
copy-file:
|
|
if: github.repository == 'github/docs-internal' || github.repository == 'github/docs'
|
|
# The type of runner that the job will run on
|
|
runs-on: ubuntu-latest
|
|
|
|
# Steps represent a sequence of tasks that will be executed as part of the job
|
|
steps:
|
|
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
|
|
- uses: actions/checkout@5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f
|
|
|
|
# Pushes to other repo
|
|
- name: Push folder to another repository
|
|
uses: crykn/copy_folder_to_another_repo_action@0282e8b9fef06de92ddcae9fe6cb44df6226646c
|
|
env:
|
|
API_TOKEN_GITHUB: ${{ secrets.API_TOKEN_SITEPOLICY }}
|
|
with:
|
|
source_folder: 'content/github/site-policy'
|
|
destination_repo: 'github/site-policy'
|
|
destination_branch: 'main'
|
|
destination_branch_create: 'repo-sync'
|
|
destination_folder: 'Policies'
|
|
user_email: 'pcihon@users.noreply.github.com'
|
|
user_name: 'pcihon'
|
|
commit_msg: 'Automatic sync from GitHub Docs.'
|