Skip to content

Commit

Permalink
ci: add semantic release
Browse files Browse the repository at this point in the history
  • Loading branch information
FritzHoing committed May 7, 2024
1 parent b836f5d commit 56c6662
Showing 1 changed file with 46 additions and 8 deletions.
54 changes: 46 additions & 8 deletions .github/workflows/gh-pages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,15 @@ jobs:
- name: Install dependencies ⏬
run: npm ci

- name: Semantic Release πŸš€
uses: cycjimmy/semantic-release-action@v4
id: semantic
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
with:
semantic_version: 23

- name: Build artifacts πŸ—οΈ
run: npm run build

Expand All @@ -74,28 +83,57 @@ jobs:
username: ${{ secrets.NEXUS_USERNAME }}
password: ${{ secrets.NEXUS_PASSWORD }}

- name: Build docker gis-client image (main) πŸ—οΈ
- name: Build docker gis-client image (latest) πŸ—οΈ
uses: docker/build-push-action@v5
with:
context: .
file: Dockerfile.gis.client
tags: |
${{ env.DOCKER_REGISTRY }}/shogun-gis-client-docs:main
${{ env.DOCKER_REGISTRY }}/shogun-gis-client-docs:latest
load: true

- name: Push docker gis-client image to Nexus (main) πŸ“ 
- name: Build docker gis-client image (version)
if: steps.semantic.outputs.new_release_published == 'true'
uses: docker/build-push-action@v5
with:
context: .
tags: |
${{ env.DOCKER_REGISTRY }}/shogun-gis-client-docs:${{ steps.semantic.outputs.new_release_version }}
load: true

- name: Push docker gis-client image to Nexus (latest) πŸ“ 
run: |
docker push ${{ env.DOCKER_REGISTRY }}/shogun-gis-client-docs:main
docker push ${{ env.DOCKER_REGISTRY }}/shogun-gis-client-docs:latest
- name: Build docker admin-client image (main) πŸ—οΈ
- name: Push docker gis-client image to Nexus (version)
if: steps.semantic.outputs.new_release_published == 'true'
run: |
docker push ${{ env.DOCKER_REGISTRY }}/shogun-gis-client-docs:${{ steps.semantic.outputs.new_release_version }}
- name: Build docker admin-client image (latest) πŸ—οΈ
uses: docker/build-push-action@v5
with:
context: .
file: Dockerfile.admin.client
tags: |
${{ env.DOCKER_REGISTRY }}/shogun-admin-client-docs:main
${{ env.DOCKER_REGISTRY }}/shogun-admin-client-docs:latest
load: true

- name: Push docker admin-client image to Nexus (main) πŸ“ 
- name: Build docker admin-client image (version)
if: steps.semantic.outputs.new_release_published == 'true'
uses: docker/build-push-action@v5
with:
context: .
tags: |
${{ env.DOCKER_REGISTRY }}/shogun-admin-client-docs:${{ steps.semantic.outputs.new_release_version }}
load: true

- name: Push docker admin-client image to Nexus (latest) πŸ“ 
run: |
docker push ${{ env.DOCKER_REGISTRY }}/shogun-admin-client-docs:main
docker push ${{ env.DOCKER_REGISTRY }}/shogun-admin-client-docs:latest
- name: Push docker admin-client image to Nexus (version)
if: steps.semantic.outputs.new_release_published == 'true'
run: |
docker push ${{ env.DOCKER_REGISTRY }}/shogun-admin-client-docs:${{ steps.semantic.outputs.new_release_version }}

0 comments on commit 56c6662

Please sign in to comment.