File tree 2 files changed +43
-0
lines changed
2 files changed +43
-0
lines changed Original file line number Diff line number Diff line change 34
34
with :
35
35
user : __token__
36
36
password : ${{ secrets.pypi_password }}
37
+ push_to_registry :
38
+ name : Push Docker image to Docker Hub
39
+ if : " success() && startsWith(github.ref, 'refs/tags/')"
40
+ runs-on : ubuntu-latest
41
+ needs : build-n-publish
42
+ steps :
43
+ - name : Check out the repo
44
+ uses : actions/checkout@v2
45
+ - name : Docker meta
46
+ id : docker_meta
47
+ uses : crazy-max/ghaction-docker-meta@v1
48
+ with :
49
+ images : koxudaxi/datamodel-code-generator
50
+ tag-semver : |
51
+ {{raw}}
52
+ - name : Login to DockerHub
53
+ uses : docker/login-action@v1
54
+ with :
55
+ username : ${{ secrets.DOCKERHUB_USERNAME }}
56
+ password : ${{ secrets.DOCKERHUB_TOKEN }}
57
+ - name : Set up QEMU
58
+ uses : docker/setup-qemu-action@v1
59
+ - name : Set up Docker Buildx
60
+ uses : docker/setup-buildx-action@v1
61
+ - name : Build and push
62
+ uses : docker/build-push-action@v2
63
+ with :
64
+ push : true
65
+ tags : ${{ steps.docker_meta.outputs.tags }}
66
+ build-args : |
67
+ VERSION=${{ steps.docker_meta.outputs.tags.0 }}
68
+ platforms : linux/amd64,linux/arm64
Original file line number Diff line number Diff line change
1
+ FROM python:3.11.0-alpine3.16 as builder
2
+
3
+ LABEL maintainer=
"Koudai Aono <[email protected] >"
4
+
5
+ RUN apk add --no-cache gcc musl-dev
6
+
7
+ ARG VERSION
8
+
9
+ RUN pip install "datamodel-code-generator[http]==$VERSION"
10
+
11
+ ENTRYPOINT ["datamodel-codegen" ]
You can’t perform that action at this time.
0 commit comments