From d3b6cd18f33ee428085d9c99691ca75d369d885a Mon Sep 17 00:00:00 2001 From: Tumay Tuzcu Date: Thu, 9 Feb 2023 00:47:50 +0300 Subject: [PATCH 1/3] ci(semver.yml): updated semantic-release to provide published flag and published_version Signed-off-by: Tumay Tuzcu --- .github/workflows/semver.yml | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/.github/workflows/semver.yml b/.github/workflows/semver.yml index f073477..c7633d5 100644 --- a/.github/workflows/semver.yml +++ b/.github/workflows/semver.yml @@ -12,32 +12,31 @@ jobs: permissions: contents: write - outputs: - new_release_published: ${{ steps.release.outputs.new_release_published }} - new_release_major_version: ${{ steps.release.outputs.new_release_major_version }} - new_release_minor_version: ${{ steps.release.outputs.new_release_minor_version }} - new_release_patch_version: ${{ steps.release.outputs.new_release_patch_version }} + outputs: + published: ${{ steps.release.outputs.published }} + published_version: ${{ steps.release.outputs.published_version }} steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 with: fetch-depth: 0 - name: Python Semantic Release id: release - uses: aasseman/python-semantic-release@gh_outputs + uses: tumaysem/python-semantic-release@master with: + additional_options: --github github_token: ${{ secrets.GITHUB_TOKEN }} container_build: runs-on: ubuntu-latest needs: release - if: needs.release.outputs.new_release_published == 'true' + if: needs.release.outputs.published == 'True' permissions: packages: write steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 with: fetch-depth: 0 - name: Build Image @@ -45,7 +44,7 @@ jobs: uses: redhat-actions/buildah-build@v2 with: image: autoagora - tags: latest v${{ needs.release.outputs.new_release_major_version }}.${{ needs.release.outputs.new_release_minor_version }}.${{ needs.release.outputs.new_release_patch_version }} v${{ needs.release.outputs.new_release_major_version }}.${{ needs.release.outputs.new_release_minor_version }} v${{ needs.release.outputs.new_release_major_version }} + tags: latest v${{ needs.release.outputs.published_version }}. v${{ needs.release.outputs.published_version }} containerfiles: | ./Dockerfile - name: Push From 5d988313ff2038b8185cb8246fa7bcce724e3a2c Mon Sep 17 00:00:00 2001 From: Tumay Tuzcu Date: Thu, 9 Feb 2023 00:57:51 +0300 Subject: [PATCH 2/3] ci(semver.yml): removed invalid '.' from build docker name Signed-off-by: Tumay Tuzcu --- .github/workflows/semver.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/semver.yml b/.github/workflows/semver.yml index c7633d5..11cf111 100644 --- a/.github/workflows/semver.yml +++ b/.github/workflows/semver.yml @@ -44,7 +44,7 @@ jobs: uses: redhat-actions/buildah-build@v2 with: image: autoagora - tags: latest v${{ needs.release.outputs.published_version }}. v${{ needs.release.outputs.published_version }} + tags: latest v${{ needs.release.outputs.published_version }} v${{ needs.release.outputs.published_version }} containerfiles: | ./Dockerfile - name: Push From 327f496d6f5d55fc4e61b5393f892b2ca5a1e265 Mon Sep 17 00:00:00 2001 From: Tumay Tuzcu Date: Thu, 9 Feb 2023 16:12:47 +0300 Subject: [PATCH 3/3] ci(semver.yml): include major and major.minor version tags for docker image Signed-off-by: Tumay Tuzcu --- .github/workflows/semver.yml | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/.github/workflows/semver.yml b/.github/workflows/semver.yml index 11cf111..fe64fc4 100644 --- a/.github/workflows/semver.yml +++ b/.github/workflows/semver.yml @@ -15,6 +15,9 @@ jobs: outputs: published: ${{ steps.release.outputs.published }} published_version: ${{ steps.release.outputs.published_version }} + published_version_major: ${{ steps.release.outputs.published_version_major }} + published_version_minor: ${{ steps.release.outputs.published_version_minor }} + published_version_patch: ${{ steps.release.outputs.published_version_patch }} steps: - uses: actions/checkout@v3 @@ -44,7 +47,11 @@ jobs: uses: redhat-actions/buildah-build@v2 with: image: autoagora - tags: latest v${{ needs.release.outputs.published_version }} v${{ needs.release.outputs.published_version }} + tags: > + latest + v${{ needs.release.outputs.published_version_major }} + v${{ needs.release.outputs.published_version_major }}.${{ needs.release.outputs.published_version_minor }} + v${{ needs.release.outputs.published_version}} containerfiles: | ./Dockerfile - name: Push