Skip to content

Commit

Permalink
Merge pull request #166 from prometheus-community/superq/role_labels
Browse files Browse the repository at this point in the history
skip_changelog: Prefix role label triggers.
  • Loading branch information
gardar authored Aug 16, 2023
2 parents 3c35895 + 8cad9a6 commit f64c347
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ansible-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ jobs:
env:
LABELS: ${{ toJson(github.event.pull_request.labels.*.name) }}
run: |
roles=$(echo $LABELS | jq -r '.[]')
roles=$(echo $LABELS | jq -r '.[]' | grep '^roles/' | sed 's|^roles/||')
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
echo '{"test":\"'"${test}"'\","name":\"'"${test#*-}\"'"}';
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/conventional-label.yml
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ jobs:
steps.changed-roles.outputs.all_changed_and_modified_files
with:
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({
issue_number: context.issue.number,
owner: context.repo.owner,
Expand Down

0 comments on commit f64c347

Please sign in to comment.