sync_repos.yaml 908 B

12345678910111213141516171819202122232425262728293031
  1. # Part of the Carbon Language project, under the Apache License v2.0 with LLVM
  2. # Exceptions. See /LICENSE for license information.
  3. # SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
  4. name: sync-repos
  5. on:
  6. push:
  7. branches: [trunk]
  8. paths:
  9. # Minimize where we run this to changes to the top-level files and
  10. # specific trees that we sync to other repositories.
  11. - '*'
  12. - 'utils/**'
  13. # Also run if the action itself is updated.
  14. - '.github/workflows/sync_repos.yaml'
  15. - 'scripts/sync_repos.sh'
  16. jobs:
  17. sync-repos:
  18. runs-on: ubuntu-latest
  19. steps:
  20. # Checkout our main repository.
  21. - name: Checkout the main repository
  22. uses: actions/checkout@v3
  23. # Run the sync script.
  24. - name: Sync to other repositories
  25. env:
  26. API_TOKEN_GITHUB: ${{ secrets.SYNC_REPOS_API_TOKEN_GITHUB }}
  27. run: ./scripts/sync_repos.sh