Skip to content
You're viewing an older version of this GitHub Action. Do you want to see the latest version instead?
upload-cloud

GitHub Action

Repo Settings Sync

v1.0.0

Repo Settings Sync

upload-cloud

Repo Settings Sync

Github Action to setup repository settings

Installation

Copy and paste the following snippet into your .yml file.

              

- name: Repo Settings Sync

uses: kbrashears5/[email protected]

Learn more about this action in kbrashears5/github-action-repo-settings-sync

Choose a version

github-action-repo-settings-sync

Github Action to setup repositories settings and keep them in sync

version

Use Cases

Great for keeping repository settings in sync across all repos. I constantly forget when creating new repos to go tweak all my repository settings how I like them, set up branch policys, etc. This allows me to add my new repo to the list (or just take the default of all and have no steps) and automatically have my settings there.

Setup

Create a new file called /.github/workflows/repo-settings-sync.yml that looks like so:

name: Repo Setup

on:
  push:
    branches:
      - master
  schedule:
    - cron: 0 0 * * *

jobs:
  repo_setup:
    runs-on: ubuntu-latest
    steps:
      - name: Repo Setup
        uses: kbrashears5/[email protected]
        with:
          REPOSITORIES: |
            kbrashears5/github-action-repo-settings-sync
          TOKEN: ${{ secrets.ACTIONS }}
          ALLOW_ISSUES: 'true'
          ALLOW_PROJECTS: 'true'
          ALLOW_WIKI: 'true'
          SQUASH_MERGE: 'true'
          MERGE_COMMIT: 'true'
          REBASE_MERGE: 'true'
          DELETE_HEAD: 'false'

Parameters

Parameter Required Default Description
TOKEN true Personal Access Token with Repo scope
REPOSITORIES false 'ALL' Github repositories to setup. Default will get all public repositories for your username
ALLOW_ISSUES false true Whether or not to allow issues on the repo
ALLOW_PROJECTS false true Whether or not to allow projects on the repo
ALLOW_WIKI false true Whether or not to allow wiki on the repo
SQUASH_MERGE false true Whether or not to allow squash merges on the repo
MERGE_COMMIT false true Whether or not to allow merge commits on the repo
REBASE_MERGE false true Whether or not to allow rebase merges on the repo
DELETE_HEAD false false Whether or not to delete head branch after merges