AndreasAugustin/actions-template-sync

:octocat: Github action for syncing other repositories (templates) with current repository. Any git provider like GitHub (enterprise), GitLab, Gittea,.. are supported for the source repository

https://github.com/andreasaugustin/actions-template-sync

Science Score: 44.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
    Found CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
  • Academic publication links
  • Committers with academic emails
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (8.1%) to scientific vocabulary

Keywords

action actions ci-cd continuous-integration gitea github github-action github-actions gitlab repository sync syncronization templates

Keywords from Contributors

standardization annotation meshing interpretability energy-systems unitful hack state-management yolov5s distributed
Last synced: 4 months ago · JSON representation ·

Repository

:octocat: Github action for syncing other repositories (templates) with current repository. Any git provider like GitHub (enterprise), GitLab, Gittea,.. are supported for the source repository

Basic Info
Statistics
  • Stars: 272
  • Watchers: 4
  • Forks: 48
  • Open Issues: 14
  • Releases: 67
Topics
action actions ci-cd continuous-integration gitea github github-action github-actions gitlab repository sync syncronization templates
Created over 5 years ago · Last pushed 4 months ago
Metadata Files
Readme Changelog Contributing Funding License Code of conduct Citation Codeowners Security

README.md

actions-template-sync

All Contributors <!-- ALL-CONTRIBUTORS-BADGE:END -->

actions-template-sync

Lint

shellcheck

test

test-hooks

test-ssh

test-ssh-gitlab

push-docker

gh-pages-mk-docs

abstract

Synchronise git repositories in an automated manner. Different git providers like GitHub (enterprise), GitLab,.. are supported as the source provider. This can help you e.g. for migration from another git provider to GitHub or if you want to mirror git repositories.

History

It is possible to create repositories within Github with GitHub templates. This is a nice approach to have some boilerplate within your repository. Over 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. The initial author of this repository faced that issue several times and decided to write a GitHub action to face that issue. Because of the nice community, several feature requests helped to go on with the development of the action. Now several other features are supported.

Features

This action is creating a pull request with the latest changes within the target repo whenever it runs with following exceptions

  • there is already an open PR created with the latest changes of the source repository.
    • if there are new changes and a PR is already open, a new PR will be created (option to clean up older PRs)
  • related new changes are ignored within the .templatesyncignore file
  • the source repository is fully included within the target repository

mermaid flowchart LR github_source("fa:fa-github <b>GitHub</b> source repository <b>[private|public]</b>") gitlab_source("fa:fa-gitlab <b>GitLab</b> source repository <b>[private|public]</b>") any_source("fa:fa-git <b>Any</b> git provider <b>[private|public]</b>") github_target{{"fa:fa-github <b>GitHub</b> target repository <b>[private|public]</b>"}} github_source --> |"<b>ssh | PAT | github app</b>"| github_target gitlab_source --> |"<b>ssh</b>"| github_target any_source --> |"<b>ssh</b>"| github_target

  • Sync other public or private repository (e.g. template repositories) with the current repository
  • Ignore files and folders from syncing using a .templatesyncignore file
  • many configuration options
  • different lifecycle hooks are supported. This opens the possibility to inject custom code into the workflow with a yaml definition file.
  • different git provider like GitLab, Gittea,.. as source are supported (with ssh). See .github/workflows/testsshgitlab.yml for an example.
  • It is not necessarily needed that source and target repository have the same base history. Because of that reason, it is possible to merge 2 totally different repositories with the help of the action.

Usage

Usage changes depending on whether the template repository is public or private, regardless of the visibility of the current repository.

Public template repository

Add this configuration to a GitHub action in the current repository:

```yaml

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

on: # cronjob trigger schedule: - cron: "0 0 1 * *" # manual trigger workflow_dispatch: jobs: repo-sync: runs-on: ubuntu-latest # https://docs.github.com/en/actions/using-jobs/assigning-permissions-to-jobs permissions: contents: write pull-requests: write

steps:
  # To use this repository's private action, you must check out the repository
  - name: Checkout
    uses: actions/checkout@v4
    # https://github.com/actions/checkout#usage
    # uncomment if you use submodules within the repository
    # with:
    #   submodules: true

  - name: actions-template-sync
    uses: AndreasAugustin/actions-template-sync@v2
    with:
      source_repo_path: <owner/repo>
      upstream_branch: <target_branch> # defaults to main
      pr_labels: <label1>,<label2>[,...] # defaults to template_sync

```

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

Private template repository

If your current repository was created from a private template, there are several possibilities.

1. Using a GitHub app

You can create and use a GitHub App to handle access to the private template repository. To generate a token for your app you can use a separate action like tibdex/github-app-token. You have to set up the checkout step with the generated token as well.

```yaml jobs: repo-sync: runs-on: ubuntu-latest

steps:
  - name: Generate token to read from source repo # see: https://github.com/tibdex/github-app-token
    id: generate_token
    # https://github.com/tibdex/github-app-token
    uses: tibdex/github-app-token@v2
    with:
      app_id: ${{ secrets.APP_ID }}
      private_key: ${{ secrets.PRIVATE_KEY }}

  - name: Checkout
    # https://github.com/actions/checkout#usage
    uses: actions/checkout@v4
    with:
      # submodules: true
      token: ${{ steps.generate_token.outputs.token }}

  - name: actions-template-sync
    uses: AndreasAugustin/actions-template-sync@v2
    with:
      source_gh_token: ${{ steps.generate_token.outputs.token }}
      source_repo_path: <owner/repo>
      upstream_branch: <target_branch> # defaults to main
      pr_labels: <label1>,<label2>[,...] # defaults to template_sync

```

2. Using SSH

You have various options to use ssh keys with GitHub. An example is deployment keys. For our use case, write permissions are not needed. Within the current repository, where the GitHub action is enabled, add a secret (e.q. SOURCE_REPO_SSH_PRIVATE_KEY) with the content of your private SSH key. Make sure that the read permissions of that secret fulfill your use case. Set the optional source_repo_ssh_private_key input parameter. It is also possible to use a different git provider, e.g. GitLab.

```yaml jobs: repo-sync: runs-on: ubuntu-latest # https://docs.github.com/en/actions/using-jobs/assigning-permissions-to-jobs permissions: contents: write pull-requests: write

steps:
  # To use this repository's private action, you must check out the repository
  - name: Checkout
    # https://github.com/actions/checkout#usage
    uses: actions/checkout@v4
    with:
      # submodules: true
      token: ${{ secrets.GITHUB_TOKEN }}

  - name: actions-template-sync
    uses: AndreasAugustin/actions-template-sync@v2
    with:
      source_gh_token: ${{ secrets.GITHUB_TOKEN }}
      source_repo_path: ${{ secrets.SOURCE_REPO_PATH }} # <owner/repo>, should be within secrets
      upstream_branch: ${{ secrets.TARGET_BRANCH }} #<target_branch> # defaults to main
      pr_labels: <label1>,<label2>[,...] # defaults to template_sync
      source_repo_ssh_private_key: ${{ secrets.SOURCE_REPO_SSH_PRIVATE_KEY }} # contains the private ssh key of the private repository

```

3. Using a PAT

:warning: when the source repository is private using PATs, also the target repository must be private. Else it won't work.

Personal access token is an alternative to using passwords for authentication to GitHub. You can add a kind of password to your GitHub account. The PAT needs a scope. We need different scopes for the source and target repo.

a. Source repo

The workflow needs read access to the source repo.

You need to set the scopes to read the source repo.

Fine grained source repo
  • contents -> read
  • metadata -> read
Classic source repo
  • repo -> all
  • read:org

pat-scopes

General source repo

Furthermore, you need to set the access within the source repository to allow GitHub actions within the target repository. As mentioned before (you can see the note in the image) you need to set the target repository to private. settings -> actions -> general.

pat-source-repo-access

b. Target repo
Fine grained target repo
  • contents -> write
  • metadata -> read
  • pull requests -> write

If you are automatically adding reviewers you also need

  • organisation:members read permissions to the PAT token.

pat-scopes-fine-grained

Classic target repo

When the action detects any changes, it will create a new branch and will push the updates to this branch. When no files are changed in the .github/workflows directory, this works well with the default ${{ github.token }} token. This token does however not have workflow scope and can therefore not make any changes to these files. For this purpose a token must be created with the following scope as depicted in the figure below.

  • workflow -> will also enable repo
  • admin:read pat-scopes

example workflow definition :warning: to the checkout action you need to add the parameter persist-credentials: false or you will most likely face an issue (#557 #627)

```yml name: actions-template-sync

on: # cronjob trigger At 00:00 on day-of-month 1. https://crontab.guru/every-month schedule: - cron: "0 0 1 * *" # manual trigger workflow_dispatch:

jobs: test-implementation-job:

runs-on: ubuntu-latest

steps:
  # To use this repository's private action, you must check out the repository
  - name: Checkout
    uses: actions/checkout@v4
    with:
      # submodules: true
      token: ${{ secrets.CUSTOM_GITHUB_PAT }}
      persist-credentials: false  # needed see #557 and #627

  - name: Test action step PAT
    uses: AndreasAugustin/actions-template-sync@v2
    with:
      source_gh_token: ${{ secrets.CUSTOM_GITHUB_PAT }}
      source_repo_path: ${{ secrets.SOURCE_REPO_PATH }} # <owner/repo>, should be within secrets

```

Action Inputs

| Variable | Description | Required | Default | |-----------------------------|---------------------------------------------------------------------------------------------------------------|----------|-----------------------------------------------------------------------| | githubtoken | :warning: [Deprecated] please use `sourceghtokeninstead to have a declarative name. Token for the repo. Can be passed in using${{ secrets.GITHUBTOKEN }}|true|${{ github.token }}| | source_gh_token |[optional]used for the source github repo token. Can be passed in using${{ secrets.GITHUBTOKEN }}|false|${{ github.token }}` | | targetghtoken | [optional] used for the source github repo token. Can be passed in using `${{ secrets.GITHUBTOKEN }}|false|${{ github.token }}| | source_repo_path | Repository path of the template |true| | | upstream_branch | The target branch |false| The remote's default (usuallymain) | | source_repo_ssh_private_key |[optional]private ssh key for the source repository. [see](#private-template-repository) |false| | | pr_branch_name_prefix |[optional]the prefix of branches created by this action |false|chore/templatesync` | | prtitle | [optional] the title of PRs opened by this action. Must be already created. | false | upstream merge template repository | | prbody | [optional] the body of PRs opened by this action. | false | `Merge ${SOURCEREPO} ${TEMPLATEGITHASH}| | pr_labels |[optional]comma separated list. [pull request labels][pr-labels]. |false|synctemplate` | | prreviewers | [optional] comma separated list of pull request reviewers. | false | | | prcommitmsg | [optional] commit message in the created pull request | false | chore(template): merge template changes :up: | | hostname | [optional] the hostname of the repository | false | github.com | | isgitlfs | [optional] set to true if you want to enalbe git lfs | false | false | | isdryrun | [optional] set to true if you do not want to push the changes and not want to create a PR | false | | | isallowhooks | [optional] set to true if you want to enable lifecycle hooks. Use this with caution! | false | false | | hooks | [optional] please check the lifecycle hooks section below | false | | | isforcepushpr | [optional] set to true if you want to force push and pr update. Needs further permissions (see below) | false | false | | isprcleanup | [optional] set to true if you want to cleanup older PRs targeting the same branch. Use this with caution! | false | false | | iskeepbranchonprcleanup | [optional] set to true if you want to keep the branch when pr is cleanup. Only makes sense together with is_pr_cleanup | false | false | | isnotsourcegithub | [optional] set to true if the source git provider is not GitHub | false | false | | isforcedeletion | [optional] set to true if you want to force delete files which are deleted within the source repository even if they contain changes. You need to also adjust `gitremotepullparams(see below for details) |false|false| | git_user_name |[optional]set the committer git user.name |false|${GITHUBACTOR}` | | gituseremail | [optional] set the committer git user.email | false | `github-action@actions-template-sync.noreply.${SOURCEREPOHOSTNAME}` | | gitremotepullparams | [optional] set remote pull parameters | false | --allow-unrelated-histories --squash --strategy=recursive -X theirs | | gpgprivatekey | [optional] set if you want to sign commits | false | | | gpgpassphrase | [optional] set if your optional gpg private key has a passphrase | false | | | steps | [optional] add the steps you want to execute within the action | false | all steps will be executed | | templatesyncignorefilepath | [optional] set the path to the ignore file. | false |.templatesyncignore | | iswith_tags | [optional] set to true if tags should be synced | false | false |

Action Outputs

Properties that are available after the action executed.

| output | description | | ------ | ----------- | | prbranch | The name of the branch used for the pull request | | templategit_hash | The template source repository git hash |

Remarks Please consider following edge cases

  • pr_branch
    • If PR branch already exists (e.g. after a 2nd run) the action won't update the branch but will still output the branch name
    • If the remote repository already contains the source repository changes the action will exit and the output variable will be undefined
    • If there are no changes the action will exit and the output variable will be undefined

Change the target branch

Per default the action is using the default branch as the target. To change this behaviour just add it to the checkout action

yaml - name: Checkout uses: actions/checkout@v4 with: ref: <target_branch> # defaults to the default branch

Docker

There are docker images available. Please checkout How to use docker for details.

Example

This repo uses this template and this action from the marketplace. See the definition within self-usage.

If you look for a more detailed guide you can have a look at

Trigger

You can use all triggers which are supported for GitHub actions

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.

It can also be stored inside .github folder.

The template_sync_ignore_file_path parameter allows you to specify a path to an ignore file. This variable defaults to .templatesyncignore. Changing this allows you to support template sync with more than one repository using different ignore files.

The action will look for the path specified within . or .github/

Note: It is not possible to sync also the .templatesyncignore itself. Any changes from the template repository will be restored automatically.

Remark reading the gitglossary (pathspec section) you see a slight difference to the .gitignore file when you like to disable files you need to use :!. E.g. when you like to disable the sync for all files with exceptions, you need to do smth like

txt :!newfile-1.txt *

Force Push and PR

If you set the input is_force_push_pr to true you are able to react to e.g. metadata changes within the workflow definition file. Please note that you need to add permissions for repository-projects: read. Compare the needed scope with gh pr edit

yaml permissions: contents: write pull-requests: write repository-projects: read

Sign commits

It is recommended to sign your commits. This action is able to sign commits.

First, generate a GPG key and export the GPG private key as an ASCII armored version to your clipboard:

```bash

macOS

gpg --armor --export-secret-key jon@doe.example | pbcopy

Ubuntu (assuming GNU base64)

gpg --armor --export-secret-key jon@doe.example -w0 | xclip

Arch

gpg --armor --export-secret-key jon@doe.example | xclip -selection clipboard -i

FreeBSD (assuming BSD base64)

gpg --armor --export-secret-key jon@doe.example | xclip ```

:warning: the gpg username and email must match the git_user_name and git_user_email parameters. Paste your clipboard as a secret named GPG_PRIVATE_KEY for example. If your key has a password, create another secret named GPG_PASSPHRASE.

```yaml

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

on: # cronjob trigger schedule: - cron: "0 0 1 * *" # manual trigger workflow_dispatch: jobs: repo-sync: runs-on: ubuntu-latest # https://docs.github.com/en/actions/using-jobs/assigning-permissions-to-jobs permissions: contents: write pull-requests: write

steps:
  # To use this repository's private action, you must check out the repository
  - name: Checkout
    uses: actions/checkout@v4

  - name: actions-template-sync
    uses: AndreasAugustin/actions-template-sync@v2
    with:
      source_gh_token: ${{ secrets.GITHUB_TOKEN }}
      source_repo_path: <owner/repo>
      git_user_name: # add the gpg username
      git_user_email: # add the gpg email
      gpg_private_key: ${{ secrets.GPG_PRIVATE_KEY }}
      # uncomment if your key has a passphrase
      # gpg_passphrase: ${{ secrets.GPG_PASSPHRASE }}

```

Lifecycle actions

The action has different phases which are executed in the following order

  • preparation prepare and configure git related things
    • init git
    • auth related (ssh or github auth)
    • [optional] gpg setup
  • prechecks run some prechecks
    • skipped if is_force_push_pr parameter is set to true
    • check if the sync branch is already existing in target repository
    • check if new changes of the source repository are already within history
  • pull pull the changes from the remote repository into the action runtime
  • commit commit the changes within the action runtime
  • push
    • if is_force_push_pr is set to true then a force push will be executed
  • pr
    • eventual create registered labels (:ninja: emojis are supported)
    • create a new PR
    • if is_force_push_pr is set to true then the PR will be created or edited
    • [optional] cleanup eventual cleanup older PRs of the action
  • set github action outputs

If is_dry_run parameter is set to true then all stages modifying the github state are not run (e.g. push, cleanup and pr).

It is possible to run a subset of the mentioned lifecycle actions. preparation and github action outputs will be run every time.

:warning: Advanced feature. Use with care (possibly set is_dry_run: true configuration parameter for testing purposes)

e.g.

```yaml

File: .github/workflows/test_steps.yml

on: # cronjob trigger schedule: - cron: "0 0 1 * *" # manual trigger workflow_dispatch: jobs: repo-sync: runs-on: ubuntu-latest # https://docs.github.com/en/actions/using-jobs/assigning-permissions-to-jobs permissions: contents: write pull-requests: write

steps:
  # To use this repository's private action, you must check out the repository
  - name: Checkout
    uses: actions/checkout@v4

  - name: actions-template-sync first steps
    uses: AndreasAugustin/actions-template-sync@v2
    with:
      source_repo_path: <owner/repo>
      steps: "prechecks,pull"  # order matters

  - name: in between step
    run: |
      echo "I can do whatever I want"
      git status

  - name: actions-template-sync next steps
    uses: AndreasAugustin/actions-template-sync@v2
    with:
      source_repo_path: <owner/repo>
      steps: "commit,push,pr"  # order matters

```

Lifecycle hooks

Different lifecycle hooks are supported. You need to enable the functionality with the option is_allow_hooks and set it to true :warning: use this functionality with caution. You can use one of the available docker images to test it out. With great power comes great responsibility.

In addition, you need either a configuration file with the name templatesync.yml within the root of the target repository or you set the hooks input parameter within the action definition with a related yaml string

The following hooks are supported (please check docs/ARCHITECTURE.md for a better understanding of the lifecycles).

  • prepull is executed before the code is pulled from the source repository
  • precommit is executed before the code is commited
  • prepush is executed before the push is executed, right after the commit
  • precleanup is executed before older PRs targeting the same branch are closed
  • prepr is executed before the PR is done

Remark If you need to install aditional tools just install them in an additional step upfront the action invokation. If using the docker image the underlying OS is defined by an Alpine container.

Example for the hooks input parameter

yml - name: Test action step uses: AndreasAugustin/actions-template-sync@v2 env: MY_VAR: "foo" # possible to define envrionment variables with: source_repo_path: AndreasAugustin/template.git upstream_branch: main is_dry_run: true is_allow_hooks: true hooks: > prepull: commands: - echo 'hi, we are within the prepull phase' - echo 'maybe you want to do adjustments on the local code'

Schema and example for the templatesync.yml

Remark It is possible to use environment variables within the github action definition usable within the command configuration, e.g.

yml - name: Test action step uses: AndreasAugustin/actions-template-sync@v2 with: source_repo_path: AndreasAugustin/template.git upstream_branch: main is_dry_run: true is_allow_hooks: true

Please not the double quotes within the following prepull echo command

yml hooks: prepull: commands: - echo "hi, we are within the prepull phase ${MY_VAR}" - echo 'maybe you want to do adjustments on the local code' precommit: commands: - echo 'hi, we are within the precommit phase' - echo 'maybe you want to add further changes before the code is committed' prepush: commands: - echo 'hi, we are within the prepush phase' - echo 'maybe you want to add further changes and commits' precleanup: commands: - echo 'hi, we are within the precleanup phase' - echo 'maybe you want to interact with older PRs before they are closed' prepr: commands: - echo 'hi, we are within the prepr phase' - echo 'maybe you want to change the code a bit and do another push before creating the pr'

Labels creation

By default, generated PRs will be labeled with the template_sync label. If that label doesn't exist in your repository, it will be created automatically unless you specify your own existing labels. Associating a label with the generated PRs helps keeping track of them and allows for features like automatic PR cleanup.

Pull request cleanup

Depending on your way of working, you may end up with multiple pull requests related to template syncing pointing to the same branch. If you want to avoid this situation, you can instruct this action to clean up older PRs (search based on labels defined with the pr_labels config parameter).

:warning: this feature will close all pull requests with labels configured with pr_labels config parameter.

Force deletion

This feature will force delete files if those are deelted within the source repository.

:warning: it is highly related to the git_remote_pull_params config parameter and won't work with the default. You need to change the default one e.g. to git_remote_pull_params: --allow-unrelated-histories --strategy=recursive --no-edit.

GHES and custom runners

Some notes if you use GitHub Enterprise Server (GHES) and/or custom runners. The action script is based on bash. That means your runner must be able to run bash scripts. Furthermore you need to have the following command line tools installed:

  • ssh
  • GitHub cli
  • git
  • optional (dependent the features you are using)
    • git lfs if you are using the lfs functionality
    • yq if you are using the hook functionality
    • gpg if you are using the git signing functionality

Furthermore most likely you have a custom domain name. Therefore you should configure the hostname GitHub action parameter.

Remark

:whale: There is also a docker image available which has all needed tools installed. This is helpful e.g. if you are not able to use a remote action. The idea is to use the docker action

Troubleshooting

  • The error message refusing to allow a GitHub App to create or update workflow '.github/workflows/<script-name>.yml' without 'workflows' permission) is indicating that the PAT in the target_gh_token does not have the correct permissions. This happens because the template repository is trying to overwrite some files inside .github/workflows/.

    Currently GITHUB_TOKEN can't be given workflow permission. You can grant our workflow with workflow permission using a PAT following the steps below:

1. [Create a PAT][github-create-pat] with these repository permissions granted: `workflow`.

2. Copy the generated token and [create a new secret for your target repository][github-create-secret].

3. Configure the `actions-template-sync` step to use the freshly generated token in `target_gh_token` like this:

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

on:
  # cronjob trigger
  schedule:
  - cron: "0 0 1 * *"
  # manual trigger
  workflow_dispatch:
jobs:
  repo-sync:
    runs-on: ubuntu-latest
    # https://docs.github.com/en/actions/using-jobs/assigning-permissions-to-jobs
    permissions:
      contents: write
      pull-requests: write

    steps:
      # To use this repository's private action, you must check out the repository
      - name: Checkout
        uses: actions/checkout@v4
        with:
          # submodules: true
          persist-credentials: false # needed

      - name: actions-template-sync
        uses: AndreasAugustin/actions-template-sync@v2
        with:
          source_gh_token: ${{ secrets.GITHUB_TOKEN }}
          target_gh_token: ${{ secrets.<secret_name> }}
          source_repo_path: <owner/repo>
          upstream_branch: <target_branch> # defaults to main
          pr_labels: <label1>,<label2>[,...] # optional, no default
```

:warning: you need to add `persist-credentials: false` to the checkout action
  • pull request create failed: GraphQL: GitHub Actions is not permitted to create or approve pull requests (createPullRequest)

Open your project Settings > Actions > General and select the checkbox Allow GitHub Actions to create and approve pull requests under the Workflow permissions section.

Release update notes

  • v2
    • git lfs is no default anymore. Enable with is_git_lfs parameter.
    • infrastructure change: now using composite action instead of docker action to be more flexible to combine more actions (file system permissions).
    • local git config now instead of global git config --global in respect to be more flexible in chaining actions.
  • :warning: starting with version v1 (v1.0.0) the upstream_branch variable default is not main anymore. It is now set to the remote default branch.
  • starting with version v0.5.2-draft the templateversionrc file is not needed anymore. You can delete that file from the target repositories.

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."

Comparison with other tools

There are other great tools available within GitHub. Here you can find a comparison.

| feature | actions-template-sync |github-sync| git-repo-sync | action-template-repository-sync | | ----------- | ------------------------- | -------------------------- | ------------------------------------ | --------------------------------- | | GitHub action | :heavycheckmark: | :heavycheckmark: | :x: | :heavycheckmark: | | hooks | :heavycheckmark: | :x: | :x: | :x: | | available docker image | :heavycheckmark: | :x: | :x: | :heavycheckmark: | | sync between private and public repo | :heavycheckmark: PAT,ssh,Github app | :heavycheckmark: PAT,ssh |:x: local repos | :heavycheckmark: PAT | | sync between 2 private repos | :heavycheckmark: PAT,ssh,Github app | :heavycheckmark: PAT,ssh | :x: local repos | :heavycheckmark: PAT | | sync between 2 public repos | :heavycheckmark: | :heavycheckmark: | :x: local repos | :heavycheckmark: | | two way sync | :x: | :heavycheckmark: | :x: | :x: | | Sync from a third-party repo to a Github repo | :heavycheckmark: | :heavycheckmark: | :x: local repos | :x: | | dry run | :heavycheckmark: | :x: | :x: | :heavycheckmark: | | ignore files | :heavycheckmark: | :x: | :x: | :heavycheckmark: | | creates a PR | :heavycheckmark: | :heavycheckmark: | :x: | :heavycheckmark: | | sign commits | :heavycheckmark: | :x: | :x: | :x: | | docker images available | :heavycheckmark: | :x: | :x: | :x: | | remarks | The action is placed within the target repositories | The action is placed within the target repositories | CLI meant for local use | The action will be based within the base repository with a list of dependent repositories |

DEV

The development environment targets are located in the Makefile

bash make help

:ninja: contributiong of any kind are welcome. Please checkout the contributing guidelines.

For some architectural notes please have a look at the docs

Contributors ✨

Thanks goes to these wonderful people (emoji key):

andy Augustin
andy Augustin

📖 💻 👀 🛡️ 🤔 💬 💡 🖋 📝 🚧 🚇 📦 ⚠️
Ugo Pattacini
Ugo Pattacini

📖
Jose Gabrielle Rivera
Jose Gabrielle Rivera

💻
P.D. Rittenhouse
P.D. Rittenhouse

🤔
Daniel Boll
Daniel Boll

🐛
albertschwarzkopf
albertschwarzkopf

🤔
Akul Pillai
Akul Pillai

🛡️
Stefan Riembauer
Stefan Riembauer

🤔
Fabrizio Cacicia
Fabrizio Cacicia

🛡️ 🐛
Justin Tunis
Justin Tunis

🤔 💻 🐛
Michael Matos
Michael Matos

🐛
Gavin Williams
Gavin Williams

🤔
Marc Siebeneicher
Marc Siebeneicher

🤔 💻 🐛 📖
Luís Henrique A. Schünemann
Luís Henrique A. Schünemann

🤔 📖 💻
George
George

💬 📖 🤔
Pedro Rivero
Pedro Rivero

🤔
Eleanor Bronson
Eleanor Bronson

🤔
Marvin Osswald
Marvin Osswald

📖
David Calvert
David Calvert

📖 🐛 💻 🚧 📝
Andy Airey
Andy Airey

🐛 👀
Surya Asriadie
Surya Asriadie

🐛
jellllly420
jellllly420

🤔 💬 📖
Shaun Tabone
Shaun Tabone

💻
Kevin AUDE
Kevin AUDE

🤔 💻
Jakob
Jakob

👀
Kevin Deldycke
Kevin Deldycke

🐛 🤔 💻
Jessica Scheick
Jessica Scheick

🐛
Gaspar Melsion
Gaspar Melsion

🤔
Ken Harding
Ken Harding

💻 🐛
Jakob Drachmann Havtorn
Jakob Drachmann Havtorn

🤔
Brian
Brian

📖
MuriloChianfa
MuriloChianfa

📖
David Snyder
David Snyder

🔬
Jonathan Østrup
Jonathan Østrup

🤔 💻
Nat Welch
Nat Welch

🐛 💻
Pepijn Boer
Pepijn Boer

🐛 📖
Alex
Alex

💻 🤔 👀 ⚠️
yuhengshen
yuhengshen

🐛 💻

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

Owner

  • Name: andy Augustin
  • Login: AndreasAugustin
  • Kind: user
  • Location: Germany
  • Company: @andreas-augustin-dev

cloud evangelist

Citation (CITATION.cff)

# This CITATION.cff file was generated with cffinit.
# Visit https://bit.ly/cffinit to generate yours today!

cff-version: 1.2.0
title: github-action-template-sync
message: >-
  If you use this software, please cite it using the
  metadata from this file.
type: software
authors:
  - given-names: Andreas
    family-names: Augustin
    orcid: 'https://orcid.org/0009-0003-8658-2370'
repository-code: 'https://github.com/AndreasAugustin/actions-template-sync'
url: 'https://andreasaugustin.github.io/actions-template-sync/'
abstract: >-
  Synchronise git repositories in an automated manner.
  Different git providers like GitHub (enterprise),
  GitLab,.. are supported as the source provider. This can
  help you e.g. for migration from another git provider to
  GitHub or if you want to mirror git repositories.
keywords:
  - github
  - repo-sync
license: MIT
version: v0.8.0

GitHub Events

Total
  • Create event: 60
  • Release event: 5
  • Issues event: 26
  • Watch event: 54
  • Delete event: 42
  • Issue comment event: 112
  • Push event: 214
  • Pull request review event: 49
  • Pull request review comment event: 25
  • Pull request event: 96
  • Fork event: 18
Last Year
  • Create event: 60
  • Release event: 5
  • Issues event: 26
  • Watch event: 54
  • Delete event: 42
  • Issue comment event: 112
  • Push event: 214
  • Pull request review event: 49
  • Pull request review comment event: 25
  • Pull request event: 96
  • Fork event: 18

Committers

Last synced: 7 months ago

All Time
  • Total Commits: 467
  • Total Committers: 26
  • Avg Commits per committer: 17.962
  • Development Distribution Score (DDS): 0.649
Past Year
  • Commits: 74
  • Committers: 11
  • Avg Commits per committer: 6.727
  • Development Distribution Score (DDS): 0.622
Top Committers
Name Email Commits
andy Augustin A****n 164
dependabot[bot] 4****] 141
allcontributors[bot] 4****] 82
github-actions[bot] 4****] 36
AndreasAugustin g****n@a****m 9
dependabot-preview[bot] 2****] 6
David Calvert d****d@0****e 3
JTunis j****1@g****m 3
Luís Henrique A. Schünemann 4****i 3
Marc Siebeneicher m****r 3
George 3****a 2
David Calvert d****t@o****m 1
Alex a****g@g****m 1
Brian 1****2 1
Jonathan Østrup 7****e 1
Jose Gabrielle Rivera r****0@g****m 1
Ken Harding k****1@g****m 1
Kevin AUDE 9****e 1
Kevin Deldycke k****n@d****m 1
Marvin Osswald 8****o 1
MuriloChianfa 6****a 1
Nat Welch n****t@n****m 1
Pepijn Boer p****r@g****m 1
Shaun Tabone s****b@g****m 1
Ugo Pattacini u****i@i****t 1
jellllly420 j****2@g****m 1
Committer Domains (Top 20 + Academic)

Issues and Pull Requests

Last synced: 4 months ago

All Time
  • Total issues: 88
  • Total pull requests: 392
  • Average time to close issues: about 1 month
  • Average time to close pull requests: 4 days
  • Total issue authors: 39
  • Total pull request authors: 21
  • Average comments per issue: 3.74
  • Average comments per pull request: 0.42
  • Merged pull requests: 329
  • Bot issues: 0
  • Bot pull requests: 269
Past Year
  • Issues: 19
  • Pull requests: 91
  • Average time to close issues: 5 days
  • Average time to close pull requests: 4 days
  • Issue authors: 15
  • Pull request authors: 10
  • Average comments per issue: 3.63
  • Average comments per pull request: 0.53
  • Merged pull requests: 65
  • Bot issues: 0
  • Bot pull requests: 66
Top Authors
Issue Authors
  • AndreasAugustin (26)
  • kdeldycke (8)
  • msiebeneicher (6)
  • PepijnB (2)
  • LuisHenri (2)
  • george-gca (2)
  • blu28 (2)
  • aairey (2)
  • JessicaS11 (2)
  • dotdc (2)
  • JakobHavtorn (2)
  • kanno41 (2)
  • asehrawat24 (2)
  • alexvanderberkel (1)
  • jellllly420 (1)
Pull Request Authors
  • dependabot[bot] (142)
  • AndreasAugustin (98)
  • github-actions[bot] (91)
  • allcontributors[bot] (69)
  • alexvanderberkel (4)
  • dotdc (4)
  • LuisHenri (3)
  • msiebeneicher (3)
  • icco (2)
  • PepijnB (2)
  • george-gca (2)
  • kdeldycke (2)
  • Olen (2)
  • kevin-aude (2)
  • brian6932 (2)
Top Labels
Issue Labels
bug (36) enhancement (24) documentation (9) help wanted (5) question (4) good first issue (2) chore (2) ci (1)
Pull Request Labels
dependencies (142) docker (93) enhancement (48) documentation (46) bug (38) autorelease: tagged (31) chore (28) autorelease: pending (27) example (19) ci (17) github_actions (14) template-sync (10) 📚 template-sync (9) template_sync (8) no-pr-activity (2)

Packages

  • Total packages: 1
  • Total downloads: unknown
  • Total dependent packages: 0
  • Total dependent repositories: 104
  • Total versions: 90
github actions: AndreasAugustin/actions-template-sync

Synchronises changes of the template repository

  • Versions: 90
  • Dependent Packages: 0
  • Dependent Repositories: 104
Rankings
Dependent packages count: 0.0%
Stargazers count: 2.0%
Average: 2.5%
Forks count: 3.2%
Dependent repos count: 4.7%
Last synced: 4 months ago

Dependencies

.github/workflows/actions_template_sync.yml actions
  • AndreasAugustin/actions-template-sync v0.6.0-draft composite
  • actions/checkout v3 composite
.github/workflows/gh_pages_mk_docs.yml actions
  • actions/checkout v3 composite
  • actions/setup-python v4 composite
.github/workflows/greetings.yml actions
  • actions/first-interaction v1 composite
.github/workflows/lint.yml actions
  • actions/checkout v3 composite
.github/workflows/push_docker.yml actions
  • actions/checkout v3 composite
  • docker/build-push-action v3 composite
  • docker/login-action v2 composite
  • docker/metadata-action v4 composite
  • peter-evans/dockerhub-description v3 composite
.github/workflows/shellcheck.yml actions
  • actions/checkout v3 composite
.github/workflows/test.yml actions
  • ./ * composite
  • actions/checkout v3 composite
.github/workflows/test_ssh.yml actions
  • ./ * composite
  • actions/checkout v3 composite
action.yml actions
  • src/Dockerfile * docker
Dockerfile docker
  • alpine 3.17.0 build
  • node 19.3.0-alpine build
docker-compose.yml docker
  • koalaman/shellcheck v0.7.2
src/Dockerfile docker
  • alpine 3.17.0 build
.github/workflows/release.yml actions
.github/workflows/release_please.yml actions
  • google-github-actions/release-please-action v3 composite
.github/workflows/release_test_docker_images.yml actions
  • actions/checkout v3 composite
  • docker/login-action v2 composite
.github/workflows/test_all.yml actions
.github/workflows/test_hooks.yml actions
  • ./ * composite
  • actions/checkout v3 composite
.github/workflows/test_ssh_gitlab.yml actions
  • ./ * composite
  • actions/checkout v3 composite
.devcontainer/docker-compose.yml docker