Skip to content

Commit 80cc469

Browse files
authored
chore: Run spectral from docker container directly (#124)
Avoid gh action that builds the docker container first
1 parent 286f5d3 commit 80cc469

File tree

3 files changed

+12
-6
lines changed

3 files changed

+12
-6
lines changed

.github/workflows/springwolf-amqp.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,11 @@ jobs:
2424
run: |
2525
echo 'extends: ["spectral:asyncapi"]' > .spectral.yaml
2626
- name: Lint asyncapi.json with spectral
27-
uses: stoplightio/spectral-action@v0.8.8
27+
uses: addnab/docker-run-action@v3
2828
with:
29-
file_glob: 'springwolf-examples/springwolf-amqp-example/src/test/resources/asyncapi.json'
29+
image: stoplight/spectral:latest
30+
options: -v ${{ github.workspace }}:${{ github.workspace }} -w ${{ github.workspace }}
31+
run: spectral lint --ruleset ./.spectral.yaml --fail-on-unmatched-globs ./springwolf-examples/springwolf-amqp-example/src/test/resources/asyncapi.json
3032

3133
- name: Set up JDK 1.8
3234
uses: actions/setup-java@v1

.github/workflows/springwolf-cloud-stream.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,11 @@ jobs:
2424
run: |
2525
echo 'extends: ["spectral:asyncapi"]' > .spectral.yaml
2626
- name: Lint asyncapi.json with spectral
27-
uses: stoplightio/spectral-action@v0.8.8
27+
uses: addnab/docker-run-action@v3
2828
with:
29-
file_glob: 'springwolf-examples/springwolf-cloud-stream-example/src/test/resources/asyncapi.json'
29+
image: stoplight/spectral:latest
30+
options: -v ${{ github.workspace }}:${{ github.workspace }} -w ${{ github.workspace }}
31+
run: spectral lint --ruleset ./.spectral.yaml --fail-on-unmatched-globs ./springwolf-examples/springwolf-cloud-stream-example/src/test/resources/asyncapi.json
3032

3133
- name: Set up JDK 1.8
3234
uses: actions/setup-java@v1

.github/workflows/springwolf-kafka.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,11 @@ jobs:
2424
run: |
2525
echo 'extends: ["spectral:asyncapi"]' > .spectral.yaml
2626
- name: Lint asyncapi.json with spectral
27-
uses: stoplightio/spectral-action@v0.8.8
27+
uses: addnab/docker-run-action@v3
2828
with:
29-
file_glob: 'springwolf-examples/springwolf-kafka-example/src/test/resources/asyncapi.json'
29+
image: stoplight/spectral:latest
30+
options: -v ${{ github.workspace }}:${{ github.workspace }} -w ${{ github.workspace }}
31+
run: spectral lint --ruleset ./.spectral.yaml --fail-on-unmatched-globs ./springwolf-examples/springwolf-kafka-example/src/test/resources/asyncapi.json
3032

3133
- name: Set up JDK 1.8
3234
uses: actions/setup-java@v1

0 commit comments

Comments
 (0)