actions-template-sync

All Contributors

Lint

It is possible to create repositories within Github with GitHub templates. This is a nice approach to have some boilerplate within your repository. Over the time the template repository will get some code changes. The problem is that the already created repositories won't know about those changes. This GitHub action will help you to keep track of the template changes.

Features

  • Sync template repository with the current repository
  • Ignore files and folders from syncing using a .templatesyncignore file

Usage

GitHub Actions

Add this configuration to your github action

# File: .github/workflows/template-sync.yml

on:
  schedule:
  - cron:  "*/15 * * * *"
jobs:
  repo-sync:
    runs-on: ubuntu-latest

    steps:
      # To use this repository's private action, you must check out the repository
      - name: Checkout
        uses: actions/checkout@v2
      - name: actions-template-sync
        uses: AndreasAugustin/actions-template-sync@v0.1.3-draft
        with:
          github_token: ${{ secrets.GITHUB_TOKEN }}
          source_repo_path: <owner/repo>
          upstream_branch: <target_branch> # defaults to main

You will receive a pull request within your repository if there are some changes available.

Ignore Files

Create a .templatesyncignore file. Just like writing a .gitignore file, follow the glob pattern in defining the files and folders that should be excluded from syncing with the template repository.

Debug

You must create a secret named ACTIONS_STEP_DEBUG with the value true to see the debug messages set by this command in the log. For more information, see "Enabling debug logging."

DEV

The development environment targets are located in the Makefile

make help

Contributors ✨

Thanks goes to these wonderful people (emoji key):


andy Augustin

📖

Ugo Pattacini

📖

This project follows the all-contributors specification. Contributions of any kind welcome!