Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/andrewthetechie/gha-repo-manager
Manage your Github repo(s) settings and secrets using Github Actions and a yaml file
https://github.com/andrewthetechie/gha-repo-manager
github-actions python
Last synced: about 1 month ago
JSON representation
Manage your Github repo(s) settings and secrets using Github Actions and a yaml file
- Host: GitHub
- URL: https://github.com/andrewthetechie/gha-repo-manager
- Owner: andrewthetechie
- License: mit
- Created: 2022-06-11T21:52:12.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2024-05-28T20:11:28.000Z (7 months ago)
- Last Synced: 2024-05-29T11:00:09.255Z (7 months ago)
- Topics: github-actions, python
- Language: Python
- Homepage: https://github.com/andrewthetechie/gha-repo-manager
- Size: 629 KB
- Stars: 22
- Watchers: 3
- Forks: 6
- Open Issues: 14
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
Awesome Lists containing this project
README
# Repo Manager via Github Actions
[![All Contributors](https://img.shields.io/badge/all_contributors-2-orange.svg?style=flat-square)](#contributors-)
## Description
Manage your Github repo(s) settings and secrets using Github Actions and a yaml file
## Usage
This action manages your repo from a yaml file. You can manage:
* branch protection
* labels
* repos
* secrets
* repo settings
* FilesSee [examples/settings.yml](./examples/settings.yml) for an example config file. The schemas for this file are in [repo_manager.schemas](./repo_magager/schemas).
### File Management -- Experimental
File management can copy files from your local environment to a target repo, copy files from one location to another in the target repo, move files in the target repo, and delete files in the target repo.
File operations are performed using the Github BLOB API and your PAT. Each file operation is a separate commit.
This feature is helpful to keep workflows or settings file in sync from a central repo to many repos.
### Example workflow
```yaml
name: Run Repo Manager
on: [workflow_dispatch]
jobs:
repo-manager:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
name: Checkout
- name: Run RepoManager
uses: andrewthetechie/gha-repo-manager@main
with:
# Apply your settings to the repo, can also be check to just check repo settings vs your file or validate, to validate your
# file is valid
action: apply
settings_file: .github/settings.yml
# need a PAT that can edit repo settings
token: ${{ secrets.GITHUB_PAT }}```
## Inputs
| parameter | description | required | default |
| - | - | - | - |
| action | What action to take with this action. One of validate, check, or apply. Validate will validate your settings file, but not touch your repo. Check will check your repo with your settings file and output a report of any drift. Apply will apply the settings in your settings file to your repo | `false` | check |
| settings_file | What yaml file to use as your settings. This is local to runner running this action. | `false` | .github/settings.yml |
| repo | What repo to perform this action on. Default is self, as in the repo this action is running in | `false` | self |
| github_server_url | Set a custom github server url for github api operations. Useful if you're running on GHE. Will try to autodiscover from env.GITHUB_SERVER_URL if left at default | `false` | none |
| token | What github token to use with this action. | `true` | |## Outputs
| parameter | description |
| - | - |
| result | Result of the action |
| diff | Diff of this action, dumped to a json string |## Runs
This action is a `docker` action.
## Contributors
Please see our [Contribution Guide](./CONTRIBUTING.md) for more info on how you can contribute. All contributors and participants in this repo must follow our [Code of Conduct](./CODE_OF_CONDUCT.md).