Skip to content

Commit

Permalink
added CI/CD workflow action auto labeler
Browse files Browse the repository at this point in the history
runs when new pushes or PR's are submitted to main.
  • Loading branch information
alhasacademy96 committed Oct 16, 2024
1 parent 4eb318d commit 041228f
Show file tree
Hide file tree
Showing 2 changed files with 53 additions and 0 deletions.
21 changes: 21 additions & 0 deletions .github/labeler.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# Label for changes in Python source code
python-source:
- 'src/**'

# Label for changes in documentation files
docs:
- '**/*.md'
- 'docs/**'

# Label for changes related to CI/CD workflows
ci-cd:
- '.github/workflows/**'

# Label for changes in YAML configuration files
config:
- '**/*.yaml'
- '**/*.yml'

# Label for changes in test files
tests:
- 'tests/**'
32 changes: 32 additions & 0 deletions .github/workflows/labeler.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: "Label Changes Based on File Paths"
on:
push:
branches:
- main
paths:
- 'src/**'
- '**/*.md'
- 'docs/**'
- '.github/workflows/**'
- '**/*.yaml'
- '**/*.yml'
- 'tests/**'
pull_request:
paths:
- 'src/**'
- '**/*.md'
- 'docs/**'
- '.github/workflows/**'
- '**/*.yaml'
- '**/*.yml'
- 'tests/**'

jobs:
apply-labels:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/labeler@v3
with:
repo-token: "${{ secrets.GITHUB_TOKEN }}"
configuration-path: .github/labeler.yml

0 comments on commit 041228f

Please sign in to comment.