forked from OpenAPITools/openapi-generator
-
Notifications
You must be signed in to change notification settings - Fork 1
53 lines (49 loc) · 1.6 KB
/
docker.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
name: Docker tests
on:
workflow_dispatch:
push:
paths:
- Dockerfile
- run-in-docker.sh
- pom.xml
- modules/openapi-generator-online/pom.xml
- modules/openapi-generator-online/Dockerfile
- modules/openapi-generator-cli/pom.xml
- modules/openapi-generator-cli/Dockerfile
pull_request:
paths:
- Dockerfile
- run-in-docker.sh
- pom.xml
- modules/openapi-generator-online/pom.xml
- modules/openapi-generator-online/Dockerfile
- modules/openapi-generator-cli/pom.xml
- modules/openapi-generator-cli/Dockerfile
jobs:
build:
name: 'Build: Docker'
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@v4
- name: Test run-in-docker.sh
shell: bash
run: |
sed -i 's/ -it / /g' run-in-docker.sh
./run-in-docker.sh mvn -B clean install
- name: Build Dockerfile
shell: bash
run: docker build .
- name: Build modules/openapi-generator-online
shell: bash
run: |
docker build modules/openapi-generator-online/ -t test
- name: Build and test modules/openapi-generator-cli
shell: bash
run: |
cp docker-entrypoint.sh ./modules/openapi-generator-cli
docker build modules/openapi-generator-cli/ -t cli-test
docker run --rm -v "${PWD}:/local" cli-test generate \
-i https://raw.githubusercontent.com/openapitools/openapi-generator/master/modules/openapi-generator/src/test/resources/3_0/petstore.yaml \
-g go \
-o /local/out/go