Skip to content

Commit

Permalink
infra: Make labeler workflow look only into master branch config
Browse files Browse the repository at this point in the history
This way do not need to manually update this workflow when new branches
appear, or when the action version bumps,
as it autogenerates the labels from the supported_branches file.
  • Loading branch information
KKoukiou committed May 22, 2024
1 parent 6f21add commit 273c0af
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 10 deletions.
16 changes: 14 additions & 2 deletions .github/labeler.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,20 @@
# File to automatically label pull requests
# See https://github.com/actions/labeler

# Always apply target fedora version to any changes
f41:
rawhide:
- base-branch: master
- any:
- changed-files:
- any-glob-to-any-file: ['**']

rhel-9:
- base-branch: rhel-9
- any:
- changed-files:
- any-glob-to-any-file: ['**']

rhel-10:
- base-branch: rhel-10
- any:
- changed-files:
- any-glob-to-any-file: ['**']
Expand Down
18 changes: 10 additions & 8 deletions .github/labeler.yml.j2
Original file line number Diff line number Diff line change
@@ -1,17 +1,19 @@
# File to automatically label pull requests
# See https://github.com/actions/labeler

# Always apply target fedora version to any changes
{% if distro_name == "fedora" and distro_release == "rawhide" %}
f{$ rawhide_fedora_version $}:
{% elif distro_name == "fedora" %}
f{$ distro_release $}:
{% elif distro_name == "rhel" %}
rhel-{$ distro_release $}:
{% endif %}
rawhide:
- base-branch: master
- any:
- changed-files:
- any-glob-to-any-file: ['**']
{% for branch in supported_branches %}

{$ branch|first $}:
- base-branch: {$ branch|first $}
- any:
- changed-files:
- any-glob-to-any-file: ['**']
{% endfor %}

documentation:
- any:
Expand Down

0 comments on commit 273c0af

Please sign in to comment.