Skip to content

Commit ba5c292

Browse files
author
Nicki Nixon
committed
fix(ci): restore original version.yml workflow logic
Accidentally replaced workflow logic when only the filename should have been updated. Restored original structure with tj-actions/changed-files and mheap/github-action-required-labels actions, only updating filename from mx_platform_api.yml to v20111101.yaml.
1 parent e5b923a commit ba5c292

1 file changed

Lines changed: 10 additions & 6 deletions

File tree

.github/workflows/version.yml

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,14 @@ jobs:
1616
id: changed-files-specific
1717
uses: tj-actions/changed-files@v41
1818
with:
19-
files: openapi/v20111101.yml
19+
files: openapi/v20111101.yaml
2020

21-
- name: Require version label on OpenAPI change
22-
if: contains(github.event.pull_request.labels.*.name, 'needs version')
23-
run: |
24-
files=$(git diff --name-only origin/master...HEAD)
25-
if echo "$files" | grep -q "openapi/v20111101.yaml"; then
21+
- name: Require version label if openapi spec changed
22+
if: steps.changed-files-specific.outputs.any_changed == 'true'
23+
uses: mheap/github-action-required-labels@v4
24+
with:
25+
mode: exactly
26+
count: 1
27+
labels: "major, minor, patch"
28+
add_comment: true
29+
message: "This PR is blocked until you add one of the following labels: {{ provided }}. Once added you can merge."

0 commit comments

Comments
 (0)