-
Notifications
You must be signed in to change notification settings - Fork 38
40 lines (35 loc) · 1.33 KB
/
update-labeler-file.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
name: Update the labeler.yml file
on:
workflow_dispatch:
schedule:
- cron: '0 2 * * 0'
jobs:
get-version:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Update the labeler file
run: |
cd ./.ci
python3 generate-labeler-file.py
- name: Check for modified files
id: git-check
run: |
echo ::set-output name=modified::$([ -z "`git status --porcelain`" ] && echo "false" || echo "true")
- name: Create Pull Request
id: cpr
if: steps.git-check.outputs.modified == 'true'
uses: peter-evans/create-pull-request@v3
with:
commit-message: Automatic update of latest releases versions
committer: GitHub <[email protected]>
branch: automatic-update-labeler-file
delete-branch: true
title: 'Automatic update `.github/labeler.yml` file :rocket:'
body: |
This automatic PR updates the content of `.github/labeler.yml` accordingly to repository structure.
This PR is triggered only if a new component has been added in the `./src` folder.
- name: Check outputs
run: |
echo "Pull Request Number - ${{ steps.cpr.outputs.pull-request-number }}"
echo "Pull Request URL - ${{ steps.cpr.outputs.pull-request-url }}"