-
Notifications
You must be signed in to change notification settings - Fork 6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
CI and dependency management upgrade
- Loading branch information
Showing
10 changed files
with
328 additions
and
1,502 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
version: 2 | ||
updates: | ||
- package-ecosystem: "maven" | ||
target-branch: "master" | ||
directory: "/" | ||
schedule: | ||
interval: "daily" | ||
ignore: | ||
- dependency-name: "*" | ||
update-types: ["version-update:semver-major"] | ||
- package-ecosystem: "maven" | ||
target-branch: "3.0.0" | ||
directory: "/" | ||
schedule: | ||
interval: "daily" | ||
ignore: | ||
- dependency-name: "*" | ||
update-types: ["version-update:semver-major"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
name: 'Dependency Review' | ||
on: [pull_request] | ||
|
||
permissions: | ||
contents: read | ||
|
||
jobs: | ||
dependency-review: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: 'Checkout Repository' | ||
uses: actions/checkout@v4 | ||
- name: Dependency Review | ||
uses: actions/dependency-review-action@v3 | ||
with: | ||
fail-on-severity: high |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
name: Build And Push Docker Release Master | ||
|
||
on: | ||
workflow_dispatch: | ||
branches: [ "master" ] | ||
inputs: | ||
tag: | ||
description: tag/version to release | ||
required: true | ||
jobs: | ||
build_push_docker_release_master: | ||
|
||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
name: git checkout master | ||
with: | ||
ref: master | ||
- name: Set up Java | ||
uses: actions/setup-java@v3 | ||
with: | ||
java-version: 17 | ||
distribution: temurin | ||
cache: maven | ||
- name: preliminary checks | ||
run: | | ||
docker login --username=${{ secrets.DOCKERHUB_SB_USERNAME }} --password=${{ secrets.DOCKERHUB_SB_PASSWORD }} | ||
set -e | ||
# fail if templates/generators contain carriage return '\r' | ||
/bin/bash ./bin/utils/detect_carriage_return.sh | ||
# fail if generators contain merge conflicts | ||
/bin/bash ./bin/utils/detect_merge_conflict.sh | ||
# fail if generators contain tab '\t' | ||
/bin/bash ./bin/utils/detect_tab_in_java_class.sh | ||
- uses: s4u/[email protected] | ||
name: setup maven settings.xml | ||
with: | ||
servers: | | ||
[{ | ||
"id": "sonatype-nexus-staging", | ||
"username": "${{ secrets.OSSRH_USERNAME }}", | ||
"password": "${{ secrets.OSSRH_TOKEN }}" | ||
}, | ||
{ | ||
"id": "sonatype-nexus-snapshots", | ||
"username": "${{ secrets.OSSRH_USERNAME }}", | ||
"password": "${{ secrets.OSSRH_TOKEN }}" | ||
}] | ||
- name: Build with Maven | ||
run: | | ||
# mvn clean install -U | ||
- name: docker build and push | ||
run: | | ||
export DOCKER_GENERATOR_IMAGE_NAME=swaggerapi/swagger-generator | ||
export DOCKER_CODEGEN_CLI_IMAGE_NAME=swaggerapi/swagger-codegen-cli | ||
export MY_POM_VERSION=`mvn -q -Dexec.executable="echo" -Dexec.args='${projects.version}' --non-recursive org.codehaus.mojo:exec-maven-plugin:1.3.1:exec` | ||
docker build --rm=false -t $DOCKER_GENERATOR_IMAGE_NAME:${{ env.TAG }} ./modules/swagger-generator | ||
docker tag $DOCKER_GENERATOR_IMAGE_NAME:${{ env.TAG }} $DOCKER_GENERATOR_IMAGE_NAME:latest | ||
docker push $DOCKER_GENERATOR_IMAGE_NAME:${{ env.TAG }} | ||
docker push $DOCKER_GENERATOR_IMAGE_NAME:latest | ||
docker build --rm=false -t $DOCKER_CODEGEN_CLI_IMAGE_NAME:${{ env.TAG }} ./modules/swagger-codegen-cli | ||
docker tag $DOCKER_CODEGEN_CLI_IMAGE_NAME:${{ env.TAG }} $DOCKER_CODEGEN_CLI_IMAGE_NAME:latest | ||
docker push $DOCKER_CODEGEN_CLI_IMAGE_NAME:${{ env.TAG }} | ||
docker push $DOCKER_CODEGEN_CLI_IMAGE_NAME:latest | ||
env: | ||
TAG: ${{ github.event.inputs.tag }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
name: PR build - master | ||
|
||
on: | ||
pull_request: | ||
c: | ||
branches: [ "master" ] | ||
|
||
jobs: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.