Files
carbon-lang/.github/workflows/sync_repos.yaml
T
Chandler Carruth a4a3cf0136 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.
2022-08-06 15:42:41 -07:00

32 lines
908 B
YAML

# 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