Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/kbrashears5/github-action-repo-sync
Github Action to sync repo metadata from code to repo
https://github.com/kbrashears5/github-action-repo-sync
description homepage keywords metadata npm nuget repo sync topics website
Last synced: 3 months ago
JSON representation
Github Action to sync repo metadata from code to repo
- Host: GitHub
- URL: https://github.com/kbrashears5/github-action-repo-sync
- Owner: kbrashears5
- License: mit
- Created: 2020-08-23T20:07:54.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2023-09-20T18:11:30.000Z (over 1 year ago)
- Last Synced: 2024-10-14T06:16:55.741Z (4 months ago)
- Topics: description, homepage, keywords, metadata, npm, nuget, repo, sync, topics, website
- Language: Shell
- Homepage: https://github.com/kbrashears5/github-action-repo-sync
- Size: 34.2 KB
- Stars: 1
- Watchers: 2
- Forks: 3
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# github-action-repo-sync
Github Action to sync repo metadata from code to repo[![version](https://img.shields.io/github/v/release/kbrashears5/github-action-repo-sync)](https://img.shields.io/github/v/release/kbrashears5/github-action-repo-sync)
# Use Cases
Keep the github metadata in sync with your code! Metadata is now configuration as code, and can be validated with a Pull Request.# Setup
Create a new file called `/.github/workflows/repo-sync.yml` that looks like so:
```yaml
name: Repo Syncon:
push:
branches:
- main
schedule:
- cron: 0 0 * * *jobs:
repo_sync:
runs-on: ubuntu-latest
steps:
- name: Fetching Local Repository
uses: actions/checkout@v3
- name: Repo Metadata Sync
uses: kbrashears5/[email protected]
with:
TYPE: npm
PATH: package.json
TOKEN: ${{ secrets.ACTIONS }}
```
## Parameters
| Parameter | Required | Description |
| --- | --- | --- |
| TYPE | true | Type of repo. See below for supported repo types |
| PATH | true | Path to the repo type's metadata file |
| TOKEN | true | Personal Access Token with Repo scope |## Supported Repo Types
| Repo Type | File | Description |
| --- | --- | --- |
| npm | package.json | package.json for repo |
| nuget | ProjectName.csproj | csproj file for project |
| python | ProjectName.toml | toml file for project |## Tips
For repo types that aren't listed above (like this one), you can still use this action, just have to get creative.For example (and I would recommend), you can create a file called `metadata.json`, choose the npm type, and make the file look like so:
```json
{
"description": "Repo description",
"homepage": "https://github.com/kbrashears5/github-action-repo-sync",
"keywords": [
"sync",
"repo",
"metadata"
]
}
```
For example, see `.github/workflows/repo-sync.yml` & `metadata.json` in this repo