Skip to content

Build and publish staging or stable charts #5

Build and publish staging or stable charts

Build and publish staging or stable charts #5

name: Build and publish staging or stable charts
on:
workflow_dispatch:
inputs:
tag:
description: "Tag to build"
required: true
type: string
release:
description: "Release stable versions, staging otherwise"
type: boolean
default: true
jobs:
stable-charts:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Log inputs
run: echo "${{ toJSON(github.event.inputs) }}"
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 0
ref: ${{ inputs.tag }}
- name: Publish OBS staging charts
if: inputs.release == false
uses: "./.github/actions/chart"
with:
build_env: staging
- name: Publish OBS stable charts
if: inputs.release == true
uses: "./.github/actions/chart"
with:
build_env: stable
keep_previous: yes
- name: create release
if: inputs.release == true
uses: ncipollo/release-action@v1
id: create_release
with:
tag: ${{ inputs.tag }}
draft: false
prerelease: true
generateReleaseNotes: true
artifacts: "build/*"
updateOnlyUnreleased: true
allowUpdates: true