Repo Configuration

repo-configuration

This action will perform the initial configuration of a repo’s settings and/or compare the current settings to the org policy and enforce the policy for any violations.

Templates

Repo Initialization Template

This template is intended to be incorporated as a workflow on creation of a new repo as part of a template

# This template is intended to be incorporated as a workflow on creation of a new repo as part of a template
name: init-repo-configuration

on:
  <your trigger>

jobs:
  call-workflow:
    name: Run the initial repo configuration
    runs-on: ubuntu-latest
    steps:
      - uses: GenapsysInc/internal-actions/reusable-actions/repo-configuration@main
        with:
          initialize: true
          disable_action: true
          token: ${{ secrets.GH_REST_API_TOKEN }}

Policy Enforcement Template

This template is intended to be incorporated as a workflow to do regular checks for a repo

# This template is intended to be incorporated as a workflow to do regular checks for a repo
name: repo-policy-enforcement

on:
  schedule:
    interval: "weekly"

jobs:
  call-workflow:
    name: Run the repo configuration check and policy enforcement
    runs-on: ubuntu-latest
    steps:
      - uses: GenapsysInc/internal-actions/reusable-actions/repo-configuration@main
        with:
          enforce_policy: true
          token: ${{ secrets.GH_REST_API_TOKEN }}