Skip to content

Commit 5cc63e7

Browse files
authored
ci(setup-labels): add setup labels workflow
Example action to auto create and sync labels based on a global config. This is action is used in all many of my repos.
1 parent e3aa62c commit 5cc63e7

1 file changed

Lines changed: 21 additions & 0 deletions

File tree

setup-labels-example.yml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
name: Setup Labels
2+
on:
3+
create:
4+
push:
5+
permissions:
6+
pull-requests: write
7+
jobs:
8+
build:
9+
runs-on: ubuntu-latest
10+
steps:
11+
# Setup (and sync) labels - Auto create and update labels for PRs based on a
12+
# config file defining the labels.
13+
- name: Setup labels
14+
uses: julbme/gh-action-manage-label@v1
15+
with:
16+
# Global config in my profile repo: https://github.com/yCodeTech/yCodeTech
17+
from: https://raw.githubusercontent.com/yCodeTech/yCodeTech/refs/heads/master/.github/config/labels.json
18+
# Don't delete existing labels that are not in the config file.
19+
skip_delete: true
20+
env:
21+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)