|
1 | 1 | # Github Topic Syncer |
2 | 2 |
|
3 | | -Sync Github Topics from a Github Action |
| 3 | +Sync Github Topics from a Github Action. |
| 4 | + |
| 5 | +Whatever topics are provided in the action will replace the topics in the Github repository |
| 6 | +when the action is executed. |
4 | 7 |
|
5 | 8 | ## Inputs |
6 | 9 |
|
| 10 | +### `topics` |
| 11 | + |
| 12 | +A space-separated list of topics to sync. Topics can only contain lower-case letters, |
| 13 | +numbers, and hyphens. |
| 14 | + |
| 15 | +#### Examples |
| 16 | + |
| 17 | +```yaml |
| 18 | +with: |
| 19 | + topics: "web-development python" |
| 20 | +``` |
| 21 | +
|
| 22 | +### `token` |
7 | 23 |
|
8 | | -## Outputs |
| 24 | +A Github personal access token with the `repo` scope. Typically this is stored |
| 25 | +in repository secrets to provide to the action: |
9 | 26 |
|
| 27 | +#### Examples |
| 28 | + |
| 29 | +```yaml |
| 30 | +with: |
| 31 | + token: ${{ secrets.gh_token }} |
| 32 | +``` |
10 | 33 |
|
11 | 34 | ## Examples |
12 | 35 |
|
| 36 | +Here's an example workflow that syncs the topics of a Github repository whenever |
| 37 | +the workflow is updated on the `main` branch. |
| 38 | + |
| 39 | +```yaml |
| 40 | +name: Sync Github Topics |
| 41 | +on: |
| 42 | + push: |
| 43 | + paths: |
| 44 | + - ".github/workflows/sync-topics.yml" |
| 45 | + branches: |
| 46 | + - main |
| 47 | +
|
| 48 | +jobs: |
| 49 | + sync-topics: |
| 50 | + runs-on: ubuntu-latest |
| 51 | + name: Sync Github Topics |
| 52 | + steps: |
| 53 | + - uses: nickderobertis/github-topic-syncer@alpha |
| 54 | + with: |
| 55 | + topics: "topic1 topic-2" |
| 56 | + token: ${{ secrets.gh_token }} |
| 57 | +``` |
13 | 58 |
|
14 | 59 | ## Development Status |
15 | 60 |
|
16 | 61 | This project uses [semantic-release](https://github.com/semantic-release/semantic-release) for versioning. |
17 | 62 | Any time the major version changes, there may be breaking changes. If it is working well for you, consider |
18 | | -pegging to the current major version, e.g. `github-topic-syncer@v1`, to avoid breaking changes. Alternatively, |
19 | | -you can always point to the most recent stable release with the `github-topic-syncer@latest`. |
20 | | - |
| 63 | +pegging to the current major version, e.g. `nickderobertis/github-topic-syncer@v1`, to avoid breaking changes. Alternatively, |
| 64 | +you can always point to the most recent stable release with the `nickderobertis/github-topic-syncer@latest`. |
21 | 65 |
|
22 | 66 | ## Developing |
23 | 67 |
|
24 | 68 | Clone the repo and then run `npm install` to set up the pre-commit hooks. |
25 | 69 |
|
26 | 70 | ## Author |
27 | 71 |
|
28 | | -Created by Nick DeRobertis. MIT License. |
| 72 | +Created by Nick DeRobertis. MIT License. |
0 commit comments