https://github.com/julbme/gh-action-manage-label
GitHub Action to manage labels in a repository
https://github.com/julbme/gh-action-manage-label
ci github-action label
Last synced: about 1 year ago
JSON representation
GitHub Action to manage labels in a repository
- Host: GitHub
- URL: https://github.com/julbme/gh-action-manage-label
- Owner: julbme
- License: mit
- Created: 2022-02-24T10:10:23.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2022-12-03T21:04:29.000Z (over 3 years ago)
- Last Synced: 2025-04-14T19:12:52.672Z (about 1 year ago)
- Topics: ci, github-action, label
- Language: Java
- Homepage: https://julbme.github.io/gh-action-manage-label/
- Size: 669 KB
- Stars: 2
- Watchers: 1
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
[](https://github.com/julbme/gh-action-manage-label/actions/workflows/maven-build.yml)
[](https://github.com/julbme/gh-action-manage-label/actions/workflows/commitlint.yml)
[](https://sonarcloud.io/summary/new_code?id=julbme_gh-action-manage-label)

# GitHub Action to manage labels
The GitHub Action for managing labels of the GitHub repository from a provided file.
It is particularly helpful when you want to setup the same labels for all your repositories.
## Usage
### Example Workflow file
- Synchronize labels from a YAML file:
```yaml
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Synchronize labels
uses: julbme/gh-action-manage-label@v1
with:
from: .github/config/labels.yml
skip_delete: false
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
```
- Synchronize labels from multiple YAML files:
```yaml
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Synchronize labels
uses: julbme/gh-action-manage-label@v1
with:
from: |
https://raw.githubusercontent.com/my-org/my-repositorty/path-to-folder-with/common-labels.yml
.github/config/labels.yml
.github/config/other-labels.yml
skip_delete: false
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
```
- Label configuration structure in YAML file:
```yaml
- name: "bug"
color: "D73A4A"
description: "Something isn't working"
- name: "critical"
color: "FF1493"
description: "High urgency label"
- name: "docs"
color: "808000"
description: "Improvements or additions to documentation"
```
### Inputs
| Name | Type | Default | Description |
|---------------|---------|-----------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------|
| `from` | string | `.github/config/labels.yml` | Path of the file containing the labels. Can be `.yml`, `.yaml` or `.json`. A HTTP/HTTPS URL can be provided if the file is stored in another repository. |
| `skip_delete` | boolean | `false` | If `true`, the process will not delete existing labels that are not defined in the file. |
> **Note** : the `from` field also accepts a multi-line parameter in order to accept multiple source files. If there is an overlap on the labels between the files, the last one will take over the others.
### Outputs
No output.
## Contributing
This project is totally open source and contributors are welcome.