Skip to content

Commit af617e8

Browse files
authored
Refactor bundle actions (#38)
1 parent 45ec243 commit af617e8

File tree

2 files changed

+9
-18
lines changed

2 files changed

+9
-18
lines changed

.github/workflows/bundle-spec.yaml

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,6 @@ name: 'SFTI Bundle API specification'
22
# caution: do not rename filename as pr workflow depends on its name
33

44
on:
5-
pull_request:
6-
types:
7-
- opened
8-
- reopened
9-
- synchronize
10-
paths:
11-
- 'src/**'
125
workflow_dispatch:
136
inputs:
147
filenames:

.github/workflows/pr.yaml

Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -6,31 +6,29 @@ on:
66
- opened
77
- reopened
88
- synchronize
9-
paths-ignore:
10-
- 'src/**'
119

1210
jobs:
13-
bundle-run-status:
14-
if: ${{ always() }}
15-
uses: swissfintechinnovations/.github/.github/workflows/reusable-bundle-status-workflow.yaml@main
11+
bundle:
12+
uses: swissfintechinnovations/.github/.github/workflows/reusable-bundle-workflow.yaml@main
13+
secrets: inherit
1614

1715
yaml-lint-src:
18-
needs: bundle-run-status
19-
if: ${{ always() }}
16+
needs: bundle
17+
if: ${{ always() && needs.bundle.result != 'failure' && github.event.pull_request.head.sha == needs.bundle.outputs.commit-sha }}
2018
uses: swissfintechinnovations/.github/.github/workflows/reusable-lint-yaml-workflow.yaml@main
2119
with:
2220
filenames: 'src/**.yaml'
2321

2422
yaml-lint:
25-
needs: bundle-run-status
26-
if: ${{ always() }}
23+
needs: bundle
24+
if: ${{ always() && needs.bundle.result != 'failure' && github.event.pull_request.head.sha == needs.bundle.outputs.commit-sha }}
2725
uses: swissfintechinnovations/.github/.github/workflows/reusable-lint-yaml-workflow.yaml@main
2826
with:
2927
filenames: '*.yaml'
3028

3129
openapi-lint:
32-
needs: bundle-run-status
33-
if: ${{ always() }}
30+
needs: bundle
31+
if: ${{ always() && needs.bundle.result != 'failure' && github.event.pull_request.head.sha == needs.bundle.outputs.commit-sha }}
3432
uses: swissfintechinnovations/.github/.github/workflows/reusable-lint-openapi-workflow.yaml@main
3533
with:
3634
filenames: '*.yaml'

0 commit comments

Comments
 (0)