mirror of
https://github.com/lingble/langtrace-helm-chart.git
synced 2026-03-20 03:55:22 +00:00
75 lines
1.9 KiB
YAML
75 lines
1.9 KiB
YAML
name: Release Helm Charts
|
|
|
|
concurrency: release-helm
|
|
|
|
on:
|
|
workflow_dispatch:
|
|
push:
|
|
branches:
|
|
- main
|
|
paths:
|
|
- 'charts/**'
|
|
|
|
jobs:
|
|
release:
|
|
runs-on: ubuntu-latest
|
|
permissions:
|
|
contents: write
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v4.1.7
|
|
with:
|
|
fetch-depth: 0
|
|
|
|
- name: Install Helm
|
|
uses: azure/setup-helm@v3
|
|
|
|
- name: Configure Git
|
|
run: |
|
|
git config user.name "$GITHUB_ACTOR"
|
|
git config user.email "$GITHUB_ACTOR@users.noreply.github.com"
|
|
|
|
- name: Release Charts
|
|
uses: helm/chart-releaser-action@v1.6.0
|
|
env:
|
|
CR_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
|
|
|
|
|
|
post-release:
|
|
name: Post Release Actions
|
|
|
|
runs-on: ubuntu-latest
|
|
if: ${{ always() }}
|
|
needs:
|
|
- release
|
|
|
|
steps:
|
|
- name: Checkout main branch
|
|
uses: actions/checkout@v4.1.7
|
|
with:
|
|
ref: main
|
|
|
|
- name: Slack - Success Message
|
|
uses: DSdatsme/slack-github-action@env_support
|
|
if: ${{ success() && needs.release.result == 'success' }}
|
|
with:
|
|
channel-id: ${{ vars.SLACK_CHANNEL_ID }}
|
|
payload-file-path: ./.github/resources/slack-payloads/slack-message-template.json
|
|
env:
|
|
SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }}
|
|
PRE_TEXT_MESSAGE: "Workflow Passed! :successkid:"
|
|
FALLBACK_MESSAGE: "Workflow Passed!"
|
|
COLOR: "good"
|
|
|
|
- name: Slack - Failure Message
|
|
uses: DSdatsme/slack-github-action@env_support
|
|
if: ${{ failure() || needs.release.result != 'success' }}
|
|
with:
|
|
channel-id: ${{ vars.SLACK_CHANNEL_ID }}
|
|
payload-file-path: ./.github/resources/slack-payloads/slack-message-template.json
|
|
env:
|
|
SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }}
|
|
PRE_TEXT_MESSAGE: "<!channel> Workflow Failed! :x:"
|
|
FALLBACK_MESSAGE: "Workflow Failed!"
|
|
COLOR: "danger"
|