Skip to content

Commit 4ec4eee

Browse files
committed
fix: add workflows to the build
1 parent dff4e71 commit 4ec4eee

File tree

2 files changed

+26
-3
lines changed

2 files changed

+26
-3
lines changed

.github/workflows/optional-spec-validations.yml

Lines changed: 25 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ on:
33
workflow_call:
44
inputs:
55
spectral_version:
6-
description: 'Version of Spectral to use'
6+
description: 'Version of Spectral to use'
77
type: string
88
required: true
99
env:
@@ -13,14 +13,29 @@ on:
1313
secrets: # all secrets are passed explicitly in this workflow
1414
api_bot_pat:
1515
required: true
16-
16+
jira_api_token:
17+
required: true
18+
workflow_dispatch:
19+
inputs:
20+
spectral_version:
21+
description: 'Version of Spectral to use'
22+
type: string
23+
required: true
24+
default: 'latest'
25+
env:
26+
description: 'Environment to validate the OpenAPI Spec for.'
27+
type: choice
28+
required: true
29+
options:
30+
- staging
31+
- production
1732

1833
permissions:
1934
contents: write
2035
issues: write
2136
id-token: write
2237

23-
jobs:
38+
jobs:
2439
optional-validations:
2540
runs-on: ubuntu-latest
2641
steps:
@@ -53,6 +68,13 @@ jobs:
5368
make convert_to_collection
5469
npx -- @stoplight/spectral-cli@"${SPECTRAL_VERSION}" lint ./tmp/collection.json --ruleset=./validation/spectral.yaml
5570
popd
71+
- name: Checkout .github folder from main branch
72+
if: ${{ failure() }}
73+
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8
74+
with:
75+
ref: main
76+
sparse-checkout: |
77+
.github/workflows
5678
- name: Create Issue - Postman validation Failed
5779
if: ${{ failure() && steps.spectral-validation.outcome == 'failure' }}
5880
uses: ./.github/workflows/task-failure-handler.yml

.github/workflows/release-spec.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,7 @@ jobs:
9696
uses: ./.github/workflows/optional-spec-validations.yml
9797
secrets:
9898
api_bot_pat: ${{ secrets.api_bot_pat }}
99+
jira_api_token: ${{ secrets.jira_api_token }}
99100
with:
100101
env: ${{ inputs.env }}
101102
spectral_version: ${{ vars.SPECTRAL_VERSION }}

0 commit comments

Comments
 (0)