Skip to content

semantic release

semantic release #10

Workflow file for this run

name: create helm chart on release
on:
workflow_dispatch:
workflow_run:
workflows: ["Pull Request Closed"] # This is the workflow that will trigger this workflow as there is dependency between them
types:
- completed
concurrency:
group: ${{ github.workflow }}
cancel-in-progress: true
jobs:
release:
runs-on: ubuntu-22.04
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Conventional Changelog Update
uses: TriPSs/conventional-changelog-action@v3
id: changelog
continue-on-error: true
with:
github-token: ${{ github.token }}
output-file: 'CHANGELOG.md'
skip-version-file: 'true'
skip-commit: 'true'
skip-on-empty: 'false'
git-push: 'true'
- name: Create Release
uses: softprops/action-gh-release@v1
if: ${{ steps.changelog.outputs.tag != '' }}
continue-on-error: true
env:
GITHUB_TOKEN: ${{ github.token }}
with:
token: ${{ github.token }}
tag_name: ${{ steps.changelog.outputs.tag }}
name: ${{ steps.changelog.outputs.tag }}
body: ${{ steps.changelog.outputs.clean_changelog }}
- name: Tag Docker Image for app container
uses: shrink/actions-docker-registry-tag@v3
if: ${{ steps.changelog.outputs.tag != '' }}
with:
registry: ghcr.io
repository: ${{ github.repository }}/nr-oracle-service
target: test
tags: ${{ steps.changelog.outputs.tag }}
- name: Tag Docker Image for init container
uses: shrink/actions-docker-registry-tag@v3
if: ${{ steps.changelog.outputs.tag != '' }}
with:
registry: ghcr.io
repository: ${{ github.repository }}/nr-oracle-service-init
target: test
tags: ${{ steps.changelog.outputs.tag }}
- name: Create Helm Package
if: ${{ steps.changelog.outputs.tag != '' }}
run: |
helm package charts/nr-oracle-service --app-version ${{ steps.changelog.outputs.tag }} --version ${{ steps.changelog.outputs.tag }}
- name: Configure Git
if: ${{ steps.changelog.outputs.tag != '' }}
run: |
git config user.name "$GITHUB_ACTOR"
git config user.email "[email protected]"
- name: Run chart-releaser
if: ${{ steps.changelog.outputs.tag != '' }}
uses: helm/[email protected]
with:
skip_packaging: true
env:
CR_TOKEN: "${{ secrets.GITHUB_TOKEN }}"