From 8725482c25fc271efe694bca614e7d99e2630356 Mon Sep 17 00:00:00 2001 From: Alexey Khudyakov Date: Mon, 9 Jan 2023 00:17:10 +0000 Subject: [PATCH 1/2] [TH2-4566] reusable workflow --- .github/workflows/dev-docker-publish.yml | 43 ++++-------------------- .github/workflows/docker-publish.yml | 41 +++++++--------------- 2 files changed, 20 insertions(+), 64 deletions(-) diff --git a/.github/workflows/dev-docker-publish.yml b/.github/workflows/dev-docker-publish.yml index 22def07..6f77755 100644 --- a/.github/workflows/dev-docker-publish.yml +++ b/.github/workflows/dev-docker-publish.yml @@ -10,39 +10,10 @@ on: - README.md jobs: - build: - runs-on: ubuntu-20.04 - steps: - - uses: actions/checkout@v2 -# Prepare custom build version - - name: Get branch name - id: branch - run: echo ::set-output name=branch_name::${GITHUB_REF#refs/*/} - - name: Get release_version - id: ver - uses: christian-draeger/read-properties@1.0.1 - with: - path: gradle.properties - property: release_version - - name: Build custom release version - id: release_ver - run: echo ::set-output name=value::"${{ steps.ver.outputs.value }}-${{ steps.branch.outputs.branch_name }}-${{ github.run_id }}" - - name: Show custom release version - run: echo ${{ steps.release_ver.outputs.value }} -# Build and publish image - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v1 - - uses: docker/login-action@v1 - with: - registry: ghcr.io - username: ${{ github.repository_owner }} - password: ${{ secrets.CR_PAT }} - - run: echo "::set-output name=REPOSITORY_NAME::$(echo '${{ github.repository }}' | awk -F '/' '{print $2}')" - id: meta - - name: Build and push - id: docker_build - uses: docker/build-push-action@v2 - with: - push: true - tags: ghcr.io/${{ github.repository }}:${{ steps.release_ver.outputs.value }} - labels: com.exactpro.th2.${{ steps.meta.outputs.REPOSITORY_NAME }}=${{ steps.ver.outputs.value }} + build-job: + uses: th2-net/.github/.github/workflows/compound-java-dev.yml@main + with: + build-target: 'Docker' + docker-username: ${{ github.actor }} + secrets: + docker-password: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/docker-publish.yml b/.github/workflows/docker-publish.yml index 9274060..cec50a6 100644 --- a/.github/workflows/docker-publish.yml +++ b/.github/workflows/docker-publish.yml @@ -3,33 +3,18 @@ name: Build and publish Docker distributions to Github Container Registry ghcr.i on: push: branches: - - master - - version-* + - master + - version-* + paths: + - gradle.properties +# - package_info.json jobs: - build: - runs-on: ubuntu-20.04 - steps: - - uses: actions/checkout@v2 - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v1 - - uses: docker/login-action@v1 - with: - registry: ghcr.io - username: ${{ github.repository_owner }} - password: ${{ secrets.CR_PAT }} - - run: echo "::set-output name=REPOSITORY_NAME::$(echo '${{ github.repository }}' | awk -F '/' '{print $2}')" - id: meta - - name: Read version from gradle.properties - id: read_property - uses: christian-draeger/read-properties@1.0.1 - with: - path: ./gradle.properties - property: release_version - - name: Build and push - id: docker_build - uses: docker/build-push-action@v2 - with: - push: true - tags: ghcr.io/${{ github.repository }}:${{ steps.read_property.outputs.value }} - labels: com.exactpro.th2.${{ steps.meta.outputs.REPOSITORY_NAME }}=${{ steps.read_property.outputs.value }} + build-job: + uses: th2-net/.github/.github/workflows/compound-java.yml@main + with: + build-target: 'Docker' + docker-username: ${{ github.actor }} + secrets: + docker-password: ${{ secrets.GITHUB_TOKEN }} + \ No newline at end of file From 1d6fa4e958ef08d0d95fb2366878cf449cc5d66b Mon Sep 17 00:00:00 2001 From: Denis Plotnikov Date: Tue, 7 Feb 2023 15:45:13 +0400 Subject: [PATCH 2/2] bump common and bom --- README.md | 5 +++++ build.gradle | 7 +++---- gradle.properties | 2 +- 3 files changed, 9 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 909afb5..38a6c59 100644 --- a/README.md +++ b/README.md @@ -175,6 +175,11 @@ May be empty due to missing required fields ## Release notes +### 0.3.0 ++ Vulnerabilities check pipeline step ++ common upgrade to `3.44.0` ++ bom upgrade to `4.1.0` + ### 0.2.0 + Feature: check for undefined fields and throw errors if they are found diff --git a/build.gradle b/build.gradle index 8bebc16..fb2b455 100644 --- a/build.gradle +++ b/build.gradle @@ -10,7 +10,7 @@ apply plugin: 'com.palantir.docker' ext { sharedDir = file("${project.rootDir}/shared") - common_version = '3.32.0' + common_version = '3.44.0' } group = 'com.exactpro.th2' @@ -57,12 +57,11 @@ jar { } dependencies { - api platform('com.exactpro.th2:bom:3.0.0') + api platform('com.exactpro.th2:bom:4.1.0') implementation "com.exactpro.th2:common:$common_version" - implementation 'com.exactpro.th2:codec:4.6.1' + implementation 'com.exactpro.th2:codec:4.7.5' - implementation 'org.slf4j:slf4j-log4j12' implementation 'org.slf4j:slf4j-api' implementation group: 'org.jetbrains.kotlin', name: 'kotlin-stdlib-jdk8', version: kotlin_version diff --git a/gradle.properties b/gradle.properties index 21726cd..22b590a 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,6 +1,6 @@ kotlin.code.style=official kotlin_version=1.5.31 -release_version=0.2.0 +release_version=0.3.0 vcs_url=https://github.com/th2-net/th2-codec-open-api \ No newline at end of file