Skip to content

Commit b328e10

Browse files
Merge pull request #19 from devgateway/task/DVIZ-24/admin-docker-optimization
Task/dviz 24/admin docker optimization
2 parents 593ba98 + a6b4850 commit b328e10

File tree

2 files changed

+29
-15
lines changed

2 files changed

+29
-15
lines changed

.github/workflows/release.yml

+27-15
Original file line numberDiff line numberDiff line change
@@ -13,15 +13,17 @@ permissions:
1313
packages: write
1414

1515
jobs:
16-
release-and-tag:
16+
prepare-a-release:
1717
runs-on: ubuntu-latest
1818
outputs:
19-
version: ${{ steps.release.outputs.version }}
19+
new_version: ${{ steps.tag_version.outputs.new_version }}
20+
new_tag: ${{ steps.tag_version.outputs.new_tag }}
2021
steps:
2122
- name: Checkout Repository
2223
uses: actions/checkout@v4
2324
with:
2425
fetch-depth: '0'
26+
2527
- name: Set up JDK
2628
uses: actions/setup-java@v4
2729
with:
@@ -62,20 +64,13 @@ jobs:
6264
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
6365

6466
- name: Generate Tag
67+
id: tag_version
6568
uses: mathieudutour/[email protected]
6669
with:
6770
github_token: ${{ secrets.GITHUB_TOKEN }}
6871
release_branches: 'master,main,release/*'
69-
70-
71-
72-
- uses: ncipollo/release-action@v1
73-
with:
74-
tag: ${{ steps.tag_version.outputs.new_tag || '1.0.0' }}
75-
name: Release ${{ steps.tag_version.outputs.new_tag || '1.0.0' }}
76-
generateReleaseNotes: 'true'
77-
bodyFile: CHANGELOG.md
78-
artifacts: forms/target/*.jar
72+
tag_prefix: 'v'
73+
dry_run: 'true'
7974

8075
build-and-push-docker-image:
8176
needs: release-and-tag
@@ -108,8 +103,25 @@ jobs:
108103
context: .
109104
push: true
110105
build-args: |
111-
VERSION=${{ needs.release-and-tag.outputs.version }}
112-
TAG=${{ needs.release-and-tag.outputs.version }}
106+
VERSION=${{ needs.release-and-tag.outputs.new_version }}
107+
TAG=${{ needs.release-and-tag.outputs.new_version }}
113108
tags: |
114109
${{ vars.DOCKER_REGISTRY }}/data-viz-admin:latest
115-
${{ vars.DOCKER_REGISTRY }}/data-viz-admin:v${{ needs.release-and-tag.outputs.version }}
110+
${{ vars.DOCKER_REGISTRY }}/data-viz-admin:v${{ needs.release-and-tag.outputs.new_version }}
111+
112+
release-on-github:
113+
needs: build-and-push-docker-image
114+
runs-on: ubuntu-latest
115+
steps:
116+
- name: Create Release
117+
id: create_release
118+
uses: softprops/action-gh-release@v2
119+
with:
120+
tag_name: ${{ needs.release-and-tag.outputs.new_tag }}
121+
files: forms/target/deps/*.jar
122+
body_path: CHANGELOG.md
123+
draft: false
124+
prerelease: false
125+
make_latest: 'true'
126+
env:
127+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

cliff.toml

+2
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,8 @@ body = """
4646
# template for the changelog footer
4747
footer = """
4848
\n
49+
Full changelog is available at \
50+
[{{ remote.github.owner }}/{{ remote.github.repo }}]/{{release.version}}\n
4951
Developed by Development Gateway
5052
"""
5153
# remove the leading and trailing whitespace from the templates

0 commit comments

Comments
 (0)