Skip to content

semantic release

semantic release #21

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:
pre-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.version != '' }}
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.version != '' }}
with:
registry: ghcr.io
repository: ${{ github.repository }}/nr-oracle-service
target: test
tags: ${{ steps.changelog.outputs.version }}
- name: Tag Docker Image for init container
uses: shrink/actions-docker-registry-tag@v3
if: ${{ steps.changelog.outputs.version != '' }}
with:
registry: ghcr.io
repository: ${{ github.repository }}/nr-oracle-service-init
target: test
tags: ${{ steps.changelog.outputs.version }}
release:
runs-on: ubuntu-22.04
needs: pre-release
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Configure Git
run: |
git config user.name "$GITHUB_ACTOR"
git config user.email "[email protected]"
- name: Run chart-releaser
uses: helm/[email protected]
env:
CR_TOKEN: "${{ secrets.GITHUB_TOKEN }}"