mirror of
https://github.com/zoriya/Kyoo.git
synced 2025-11-26 08:15:07 -05:00
Allow manual helm chart publishing for specific tags (#1174)
This commit is contained in:
parent
9a00d5036f
commit
3b76fb2647
62
.github/workflows/helm-release-chart.yml
vendored
62
.github/workflows/helm-release-chart.yml
vendored
@ -2,41 +2,53 @@ name: Release Helm Chart
|
|||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
tags:
|
tags:
|
||||||
- v*
|
- v*
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
|
inputs:
|
||||||
|
channel:
|
||||||
|
description: 'Release channel (master, edge, or leave blank for tag-based)'
|
||||||
|
required: false
|
||||||
|
default: 'master'
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
release:
|
release:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout code
|
- name: Checkout code
|
||||||
uses: actions/checkout@v5
|
uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0
|
||||||
|
|
||||||
- name: Set up Helm
|
- name: Set up Helm
|
||||||
uses: azure/setup-helm@v4
|
uses: azure/setup-helm@1a275c3b69536ee54be43f2070a358922e12c8d4 # v4.3.1
|
||||||
|
|
||||||
- name: Log in to GHCR
|
- name: Log in to GHCR
|
||||||
uses: docker/login-action@v3
|
uses: docker/login-action@5e57cd118135c172c3672efd75eb46360885c0ef # v3.6.0
|
||||||
with:
|
with:
|
||||||
registry: ghcr.io
|
registry: ghcr.io
|
||||||
username: ${{ github.actor }}
|
username: ${{ github.actor }}
|
||||||
password: ${{ secrets.GITHUB_TOKEN }}
|
password: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
|
||||||
- name: Update Helm Dependencies
|
- name: Update Helm Dependencies
|
||||||
run: |
|
run: helm dependency update ./chart
|
||||||
helm dependency update ./chart
|
|
||||||
|
|
||||||
- name: Package Helm Chart
|
- name: Determine Chart Version
|
||||||
run: |
|
id: version
|
||||||
export tag=$(echo ${GITHUB_REF#refs/tags/} | sed 's/^v//')
|
run: |
|
||||||
helm package ./chart --version $tag --app-version $tag
|
if [ "${{ github.event_name }}" = "workflow_dispatch" ]; then
|
||||||
|
TAG="${{ github.event.inputs.channel }}"
|
||||||
|
else
|
||||||
|
TAG=$(echo ${GITHUB_REF#refs/tags/} | sed 's/^v//')
|
||||||
|
fi
|
||||||
|
echo "TAG=$TAG" >> "${GITHUB_ENV}"
|
||||||
|
echo "Using chart version: $TAG"
|
||||||
|
|
||||||
- name: Build Helm-safe repo name
|
- name: Package Helm Chart
|
||||||
run: |
|
run: helm package ./chart --version $TAG --app-version $TAG
|
||||||
REPO_NAME="$(echo "oci://ghcr.io/${GITHUB_REPOSITORY_OWNER}/helm-charts" | tr '[:upper:]' '[:lower:]')"
|
|
||||||
echo "REPO_NAME=${REPO_NAME}" >> "${GITHUB_ENV}"
|
|
||||||
|
|
||||||
- name: Push Helm Chart to GHCR
|
- name: Build Helm-safe repo name
|
||||||
run: |
|
run: |
|
||||||
helm push kyoo-*.tgz "${REPO_NAME}"
|
REPO_NAME="$(echo "oci://ghcr.io/${GITHUB_REPOSITORY_OWNER}/helm-charts" | tr '[:upper:]' '[:lower:]')"
|
||||||
|
echo "REPO_NAME=${REPO_NAME}" >> "${GITHUB_ENV}"
|
||||||
|
|
||||||
|
- name: Push Helm Chart to GHCR
|
||||||
|
run: helm push kyoo-*.tgz "${REPO_NAME}"
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user