Skip to content

Commit 33476e6

Browse files
authored
Document Docker image and action usage (#3544)
1 parent a437c7d commit 33476e6

4 files changed

Lines changed: 27 additions & 23 deletions

File tree

README.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,10 @@ pip install 'datamodel-code-generator[protobuf]'
9393
docker pull koxudaxi/datamodel-code-generator
9494
```
9595

96+
Published Docker images run as a non-root `appuser`. When writing generated files
97+
to a bind-mounted directory, make sure the directory is writable by the container
98+
user or pass an explicit Docker user, for example `--user "$(id -u):$(id -g)"`.
99+
96100
</details>
97101

98102
---
@@ -314,7 +318,7 @@ See [pyproject.toml Configuration](https://datamodel-code-generator.koxudaxi.dev
314318
Validate generated models in your CI pipeline:
315319

316320
```yaml
317-
- uses: koxudaxi/datamodel-code-generator@0.44.0
321+
- uses: koxudaxi/datamodel-code-generator@0.66.3
318322
with:
319323
input: schemas/api.yaml
320324
output: src/models/api.py

docs/ci-cd.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ The official GitHub Action provides a simple way to validate generated models in
1616
### Basic Usage
1717

1818
```yaml
19-
- uses: koxudaxi/datamodel-code-generator@0.44.0
19+
- uses: koxudaxi/datamodel-code-generator@0.66.3
2020
with:
2121
input: schema.yaml
2222
output: src/models.py
@@ -58,7 +58,7 @@ jobs:
5858
steps:
5959
- uses: actions/checkout@v4
6060
61-
- uses: koxudaxi/datamodel-code-generator@0.44.0
61+
- uses: koxudaxi/datamodel-code-generator@0.66.3
6262
with:
6363
input: schemas/api.yaml
6464
output: src/models/api.py
@@ -86,7 +86,7 @@ jobs:
8686
steps:
8787
- uses: actions/checkout@v4
8888
89-
- uses: koxudaxi/datamodel-code-generator@0.44.0
89+
- uses: koxudaxi/datamodel-code-generator@0.66.3
9090
with:
9191
input: ${{ matrix.input }}
9292
output: ${{ matrix.output }}
@@ -98,7 +98,7 @@ jobs:
9898
### Example: Using Profiles
9999

100100
```yaml
101-
- uses: koxudaxi/datamodel-code-generator@0.44.0
101+
- uses: koxudaxi/datamodel-code-generator@0.66.3
102102
with:
103103
input: schemas/api.yaml
104104
output: src/models.py
@@ -112,7 +112,7 @@ jobs:
112112
Set `check: 'false'` to actually generate the models:
113113
114114
```yaml
115-
- uses: koxudaxi/datamodel-code-generator@0.44.0
115+
- uses: koxudaxi/datamodel-code-generator@0.66.3
116116
with:
117117
input: schema.yaml
118118
output: src/models.py
@@ -126,7 +126,7 @@ Set `check: 'false'` to actually generate the models:
126126
For GraphQL schemas, use the `extras` input to install the required dependency:
127127

128128
```yaml
129-
- uses: koxudaxi/datamodel-code-generator@0.44.0
129+
- uses: koxudaxi/datamodel-code-generator@0.66.3
130130
with:
131131
input: schema.graphql
132132
output: src/models.py
@@ -138,7 +138,7 @@ For GraphQL schemas, use the `extras` input to install the required dependency:
138138
### Example: Apache Avro Schema
139139

140140
```yaml
141-
- uses: koxudaxi/datamodel-code-generator@0.44.0
141+
- uses: koxudaxi/datamodel-code-generator@0.66.3
142142
with:
143143
input: schema.avsc
144144
output: src/models.py
@@ -151,7 +151,7 @@ For GraphQL schemas, use the `extras` input to install the required dependency:
151151
You can install multiple extras with comma-separated values:
152152

153153
```yaml
154-
- uses: koxudaxi/datamodel-code-generator@0.44.0
154+
- uses: koxudaxi/datamodel-code-generator@0.66.3
155155
with:
156156
input: schema.yaml
157157
output: src/models.py
@@ -165,7 +165,7 @@ You can install multiple extras with comma-separated values:
165165
Use `extra-args` for CLI options not covered by the inputs:
166166

167167
```yaml
168-
- uses: koxudaxi/datamodel-code-generator@0.44.0
168+
- uses: koxudaxi/datamodel-code-generator@0.66.3
169169
with:
170170
input: schema.yaml
171171
output: src/models.py
@@ -175,7 +175,7 @@ Use `extra-args` for CLI options not covered by the inputs:
175175
```
176176

177177
!!! tip "Version Pinning"
178-
Always pin the action to a specific version tag (e.g., `@0.44.0`) to ensure reproducible builds. The action installs the same version of `datamodel-code-generator` as the tag.
178+
Always pin the action to a specific version tag (e.g., `@0.66.3`) to ensure reproducible builds. The action installs the same version of `datamodel-code-generator` as the tag.
179179

180180
---
181181

docs/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -307,7 +307,7 @@ See [pyproject.toml Configuration](pyproject_toml.md) for more options.
307307
Validate generated models in your CI pipeline:
308308

309309
```yaml title=".github/workflows/validate-models.yml"
310-
- uses: koxudaxi/datamodel-code-generator@0.44.0
310+
- uses: koxudaxi/datamodel-code-generator@0.66.3
311311
with:
312312
input: schemas/api.yaml
313313
output: src/models/api.py

docs/llms-full.txt

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -309,7 +309,7 @@ See [pyproject.toml Configuration](pyproject_toml.md) for more options.
309309
Validate generated models in your CI pipeline:
310310

311311
```yaml title=".github/workflows/validate-models.yml"
312-
- uses: koxudaxi/datamodel-code-generator@0.44.0
312+
- uses: koxudaxi/datamodel-code-generator@0.66.3
313313
with:
314314
input: schemas/api.yaml
315315
output: src/models/api.py
@@ -36477,7 +36477,7 @@ The official GitHub Action provides a simple way to validate generated models in
3647736477
### Basic Usage
3647836478

3647936479
```yaml
36480-
- uses: koxudaxi/datamodel-code-generator@0.44.0
36480+
- uses: koxudaxi/datamodel-code-generator@0.66.3
3648136481
with:
3648236482
input: schema.yaml
3648336483
output: src/models.py
@@ -36519,7 +36519,7 @@ jobs:
3651936519
steps:
3652036520
- uses: actions/checkout@v4
3652136521

36522-
- uses: koxudaxi/datamodel-code-generator@0.44.0
36522+
- uses: koxudaxi/datamodel-code-generator@0.66.3
3652336523
with:
3652436524
input: schemas/api.yaml
3652536525
output: src/models/api.py
@@ -36547,7 +36547,7 @@ jobs:
3654736547
steps:
3654836548
- uses: actions/checkout@v4
3654936549

36550-
- uses: koxudaxi/datamodel-code-generator@0.44.0
36550+
- uses: koxudaxi/datamodel-code-generator@0.66.3
3655136551
with:
3655236552
input: ${{ matrix.input }}
3655336553
output: ${{ matrix.output }}
@@ -36559,7 +36559,7 @@ jobs:
3655936559
### Example: Using Profiles
3656036560

3656136561
```yaml
36562-
- uses: koxudaxi/datamodel-code-generator@0.44.0
36562+
- uses: koxudaxi/datamodel-code-generator@0.66.3
3656336563
with:
3656436564
input: schemas/api.yaml
3656536565
output: src/models.py
@@ -36573,7 +36573,7 @@ jobs:
3657336573
Set `check: 'false'` to actually generate the models:
3657436574

3657536575
```yaml
36576-
- uses: koxudaxi/datamodel-code-generator@0.44.0
36576+
- uses: koxudaxi/datamodel-code-generator@0.66.3
3657736577
with:
3657836578
input: schema.yaml
3657936579
output: src/models.py
@@ -36587,7 +36587,7 @@ Set `check: 'false'` to actually generate the models:
3658736587
For GraphQL schemas, use the `extras` input to install the required dependency:
3658836588

3658936589
```yaml
36590-
- uses: koxudaxi/datamodel-code-generator@0.44.0
36590+
- uses: koxudaxi/datamodel-code-generator@0.66.3
3659136591
with:
3659236592
input: schema.graphql
3659336593
output: src/models.py
@@ -36599,7 +36599,7 @@ For GraphQL schemas, use the `extras` input to install the required dependency:
3659936599
### Example: Apache Avro Schema
3660036600

3660136601
```yaml
36602-
- uses: koxudaxi/datamodel-code-generator@0.44.0
36602+
- uses: koxudaxi/datamodel-code-generator@0.66.3
3660336603
with:
3660436604
input: schema.avsc
3660536605
output: src/models.py
@@ -36612,7 +36612,7 @@ For GraphQL schemas, use the `extras` input to install the required dependency:
3661236612
You can install multiple extras with comma-separated values:
3661336613

3661436614
```yaml
36615-
- uses: koxudaxi/datamodel-code-generator@0.44.0
36615+
- uses: koxudaxi/datamodel-code-generator@0.66.3
3661636616
with:
3661736617
input: schema.yaml
3661836618
output: src/models.py
@@ -36626,7 +36626,7 @@ You can install multiple extras with comma-separated values:
3662636626
Use `extra-args` for CLI options not covered by the inputs:
3662736627

3662836628
```yaml
36629-
- uses: koxudaxi/datamodel-code-generator@0.44.0
36629+
- uses: koxudaxi/datamodel-code-generator@0.66.3
3663036630
with:
3663136631
input: schema.yaml
3663236632
output: src/models.py
@@ -36636,7 +36636,7 @@ Use `extra-args` for CLI options not covered by the inputs:
3663636636
```
3663736637

3663836638
!!! tip "Version Pinning"
36639-
Always pin the action to a specific version tag (e.g., `@0.44.0`) to ensure reproducible builds. The action installs the same version of `datamodel-code-generator` as the tag.
36639+
Always pin the action to a specific version tag (e.g., `@0.66.3`) to ensure reproducible builds. The action installs the same version of `datamodel-code-generator` as the tag.
3664036640

3664136641
---
3664236642

0 commit comments

Comments
 (0)