mirror of
https://github.com/prometheus-community/ansible
synced 2025-02-16 20:58:26 +00:00
skip_changelog: Prefix role label triggers.
Add the prefix `roles/` to the per-role label names in order to namespace them from other labels. Signed-off-by: SuperQ <superq@gmail.com>
This commit is contained in:
parent
2d8c557b15
commit
8cad9a6f15
2 changed files with 2 additions and 2 deletions
2
.github/workflows/ansible-ci.yml
vendored
2
.github/workflows/ansible-ci.yml
vendored
|
@ -69,7 +69,7 @@ jobs:
|
||||||
env:
|
env:
|
||||||
LABELS: ${{ toJson(github.event.pull_request.labels.*.name) }}
|
LABELS: ${{ toJson(github.event.pull_request.labels.*.name) }}
|
||||||
run: |
|
run: |
|
||||||
roles=$(echo $LABELS | jq -r '.[]')
|
roles=$(echo $LABELS | jq -r '.[]' | grep '^roles/' | sed 's|^roles/||')
|
||||||
echo tests="[`for role in $roles; do
|
echo tests="[`for role in $roles; do
|
||||||
for test in $(find tests/integration/targets -maxdepth 1 -mindepth 1 -type d -iname "molecule-${role}-*" -printf "%f\n"); do
|
for test in $(find tests/integration/targets -maxdepth 1 -mindepth 1 -type d -iname "molecule-${role}-*" -printf "%f\n"); do
|
||||||
echo '{"test":\"'"${test}"'\","name":\"'"${test#*-}\"'"}';
|
echo '{"test":\"'"${test}"'\","name":\"'"${test#*-}\"'"}';
|
||||||
|
|
2
.github/workflows/conventional-label.yml
vendored
2
.github/workflows/conventional-label.yml
vendored
|
@ -69,7 +69,7 @@ jobs:
|
||||||
steps.changed-roles.outputs.all_changed_and_modified_files
|
steps.changed-roles.outputs.all_changed_and_modified_files
|
||||||
with:
|
with:
|
||||||
script: |
|
script: |
|
||||||
const labels = '${{ steps.changed-roles.outputs.all_changed_and_modified_files }}'.split(' ');
|
const labels = '${{ steps.changed-roles.outputs.all_changed_and_modified_files }}'.split(' ').map(i => 'roles/' + i);
|
||||||
github.rest.issues.addLabels({
|
github.rest.issues.addLabels({
|
||||||
issue_number: context.issue.number,
|
issue_number: context.issue.number,
|
||||||
owner: context.repo.owner,
|
owner: context.repo.owner,
|
||||||
|
|
Loading…
Add table
Reference in a new issue