FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
openapi-generator/.github/workflows/docker-release.yml at master · fetis/openapi-generator · GitHub
fetis
/
openapi-generator
Public
forked from
OpenAPITools/openapi-generator
Notifications
You must be signed in to change notification settings
Fork
0
Star
0
Code
Pull requests
0
Actions
Projects
Security and quality
0
Insights
Additional navigation options
Code
Pull requests
Actions
Projects
Security and quality
Insights
Expand file tree
Breadcrumbs
openapi-generator
/
.github
/
workflows
/
docker-release.yml
Copy path
View runs
More file actions
More file actions
Latest commit
History
History
History
74 lines (70 loc) · 4.31 KB
Breadcrumbs
openapi-generator
/
.github
/
workflows
/
docker-release.yml
Copy path
File metadata and controls
74 lines (70 loc) · 4.31 KB
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
name
:
Release to DockerHub (snapshot, stable)
on
:
push
:
tags
:
-
'
v*
'
#
Triggers on any tag starting with 'v' (e.g., v1.0, v2.1.3)
branches
:
-
master
jobs
:
docker
:
name
:
Publish images
runs-on
:
ubuntu-latest
steps
:
#
build the JARs
-
uses
:
actions/checkout@v5
with
:
fetch-depth
:
0
-
name
:
Set up JDK 11
uses
:
actions/setup-java@v5
with
:
java-version
:
11
distribution
:
'
zulu
'
-
name
:
Cache Maven packages
uses
:
actions/cache@v4
with
:
path
:
~/.m2
key
:
${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
restore-keys
:
${{ runner.os }}-m2
-
name
:
Build
run
:
./mvnw clean install -DskipTests=true
#
docker workflow
-
name
:
Set up QEMU
uses
:
docker/setup-qemu-action@v3
-
name
:
Set up Docker Buildx
uses
:
docker/setup-buildx-action@v3
-
name
:
Login to DockerHub
uses
:
docker/login-action@v3
with
:
username
:
${{ secrets.DOCKER_USERNAME }}
password
:
${{ secrets.DOCKER_PASSWORD }}
-
name
:
Setup variables
run
:
|
# set as GitHub ENV variables
echo "cli_version=$(\./mvnw -o org.apache.maven.plugins:maven-help-plugin:2.1.1:evaluate -Dexpression=project.version | grep -v '\[')" >> $GITHUB_ENV
echo "build_date=$(date -u +"%Y-%m-%dT%H:%M:%SZ")" >> $GITHUB_ENV
echo "DOCKER_GENERATOR_IMAGE_NAME=openapitools/openapi-generator-online" >> $GITHUB_ENV
echo "DOCKER_CODEGEN_CLI_IMAGE_NAME=openapitools/openapi-generator-cli" >> $GITHUB_ENV
#
online images
-
name
:
Publish openapi-generator-online snapshot version
if
:
github.ref_type != 'tag'
#
not tag (release)
run
:
|
docker buildx create --use
docker buildx build --push --platform linux/amd64,linux/arm64 --label=org.opencontainers.image.created=${{ env.build_date }} --label=org.opencontainers.image.title=openapi-generator-online --label=org.opencontainers.image.revision=$GITHUB_SHA --label=org.opencontainers.image.version=${{ env.cli_version }} -t ${{ env.DOCKER_GENERATOR_IMAGE_NAME }} ./modules/openapi-generator-online
-
name
:
Publish openapi-generator-online stable version
if
:
github.ref_type == 'tag'
#
tagged (release)
run
:
|
docker buildx create --use
docker buildx build --push --platform linux/amd64,linux/arm64 --label=org.opencontainers.image.created=${{ env.build_date }} --label=org.opencontainers.image.title=openapi-generator-online --label=org.opencontainers.image.revision=$GITHUB_SHA --label=org.opencontainers.image.version=${{ env.cli_version }} -t ${{ env.DOCKER_GENERATOR_IMAGE_NAME }}:latest -t ${{ env.DOCKER_GENERATOR_IMAGE_NAME }}:${{ github.ref_name }} -t ${{ env.DOCKER_GENERATOR_IMAGE_NAME }} -t ${{ env.DOCKER_GENERATOR_IMAGE_NAME }}:latest-release ./modules/openapi-generator-online
#
cli images
-
name
:
Publish openapi-generator-cli snapshot version
if
:
github.ref_type != 'tag'
#
not tag (release)
run
:
|
cp docker-entrypoint.sh ./modules/openapi-generator-cli
docker buildx create --use
docker buildx build --push --platform linux/amd64,linux/arm64 --label=org.opencontainers.image.created=${{ env.build_date }} --label=org.opencontainers.image.title=openapi-generator-cli --label=org.opencontainers.image.revision=$GITHUB_SHA --label=org.opencontainers.image.version=${{ env.cli_version }} -t ${{ env.DOCKER_CODEGEN_CLI_IMAGE_NAME }} ./modules/openapi-generator-cli
-
name
:
Publish openapi-generator-cli stable version
if
:
github.ref_type == 'tag'
#
tagged (release)
run
:
|
cp docker-entrypoint.sh ./modules/openapi-generator-cli
docker buildx create --use
docker buildx build --push --platform linux/amd64,linux/arm64 --label=org.opencontainers.image.created=${{ env.build_date }} --label=org.opencontainers.image.title=openapi-generator-cli --label=org.opencontainers.image.revision=$GITHUB_SHA --label=org.opencontainers.image.version=${{ env.cli_version }} -t ${{ env.DOCKER_CODEGEN_CLI_IMAGE_NAME }}:latest -t ${{ env.DOCKER_CODEGEN_CLI_IMAGE_NAME }}:${{ github.ref_name }} -t ${{ env.DOCKER_CODEGEN_CLI_IMAGE_NAME }} -t ${{ env.DOCKER_CODEGEN_CLI_IMAGE_NAME }}:latest-release ./modules/openapi-generator-cli
Back
|
FazBrowse Home
|
New Git URL