Create a sync-repos action. (#1863)

This will allow us to automatically create and maintain specific repos
based on the main repository here, pulling key files like the license
and other infrastructure and pushing them systematically to a narrow
repo. Things like editor plugins that are best packaged and installed
from a separate repos can still be developed in a central place, even
potentially sharing common things like grammars where useful.

Currently this will maintain a Vim plugin repository out of the
`utils/vim` directory, but can be easily expanded for other systems.
This commit is contained in:
Chandler Carruth
2022-08-06 15:42:41 -07:00
committed by GitHub
parent b9e6f82f5d
commit a4a3cf0136
3 changed files with 122 additions and 2 deletions
+31
View File
@@ -0,0 +1,31 @@
# Part of the Carbon Language project, under the Apache License v2.0 with LLVM
# Exceptions. See /LICENSE for license information.
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
name: sync-repos
on:
push:
branches: [trunk]
paths:
# Minimize where we run this to changes to the top-level files and
# specific trees that we sync to other repositories.
- '*'
- 'utils/**'
# Also run if the action itself is updated.
- '.github/workflows/sync_repos.yaml'
- 'scripts/sync_repos.sh'
jobs:
sync-repos:
runs-on: ubuntu-latest
steps:
# Checkout our main repository.
- name: Checkout the main repository
uses: actions/checkout@v2
# Run the sync script.
- name: Sync to other repositories
env:
API_TOKEN_GITHUB: ${{ secrets.SYNC_REPOS_API_TOKEN_GITHUB }}
run: ./scripts/sync_repos.sh