Helm Chart Releaser Action 使用教程

Helm Chart Releaser Action 使用教程

chart-releaser-actionA GitHub Action to turn a GitHub project into a self-hosted Helm chart repo, using helm/chart-releaser CLI tool项目地址:https://gitcode.com/gh_mirrors/ch/chart-releaser-action

1. 项目的目录结构及介绍

Helm Chart Releaser Action 项目的目录结构如下:

.
├── CODE_OF_CONDUCT.md
├── LICENSE
├── README.md
├── action.yml
└── cr.sh
  • CODE_OF_CONDUCT.md: 行为准则文件,规定了项目参与者的行为规范。
  • LICENSE: 许可证文件,本项目采用 Apache-2.0 许可证。
  • README.md: 项目说明文件,包含了项目的基本介绍、使用方法和贡献指南。
  • action.yml: GitHub Action 的配置文件,定义了 Action 的输入、输出和运行步骤。
  • cr.sh: 脚本文件,用于执行 Helm Chart Releaser 的命令。

2. 项目的启动文件介绍

项目的启动文件是 action.yml,这是一个 YAML 格式的文件,用于定义 GitHub Action 的行为。以下是 action.yml 的主要内容:

name: 'Helm Chart Releaser'
description: 'A GitHub Action to turn a GitHub project into a self-hosted Helm chart repo using helm/chart-releaser CLI tool'
inputs:
  version:
    description: 'The chart-releaser version to use'
    default: 'v1.6.0'
  config:
    description: 'Optional config file for chart-releaser'
    required: false
  charts_dir:
    description: 'The charts directory'
    default: 'charts'
  skip_packaging:
    description: 'This option when populated will skip the packaging step'
    default: ''
  skip_existing:
    description: 'Skip package upload if release/tag already exists'
    default: ''
  skip_upload:
    description: 'This option when populated will skip the upload step'
    default: ''
  mark_as_latest:
    description: 'When you set this to false it will mark the created GitHub release not as \'latest\''
    default: 'true'
  packages_with_index:
    description: 'When you set this to true it will upload chart packages directly into publishing branch'
    default: 'false'
  pages_branch:
    description: 'Name of the branch to be used to push the index and artifacts'
    default: 'gh-pages'
runs:
  using: 'docker'
  image: 'Dockerfile'
  args:
    - '--config'
    - '${{ inputs.config }}'
    - 'upload'
    - '--charts-dir'
    - '${{ inputs.charts_dir }}'
    - '--skip-packaging'
    - '${{ inputs.skip_packaging }}'
    - '--skip-existing'
    - '${{ inputs.skip_existing }}'
    - '--skip-upload'
    - '${{ inputs.skip_upload }}'
    - '--mark-as-latest'
    - '${{ inputs.mark_as_latest }}'
    - '--packages-with-index'
    - '${{ inputs.packages_with_index }}'
    - '--pages-branch'
    - '${{ inputs.pages_branch }}'
  • name: Action 的名称。
  • description: Action 的描述。
  • inputs: 定义了 Action 的输入参数,包括版本、配置文件、图表目录等。
  • runs: 定义了 Action 的运行方式和参数。

3. 项目的配置文件介绍

项目的配置文件是 action.yml,它定义了 GitHub Action 的行为和参数。以下是一些关键的配置项:

  • version: 指定使用的 chart-releaser 版本。
  • config: 可选的 chart-releaser 配置文件路径。
  • charts_dir: 包含 Helm 图表的目录,默认为 charts
  • skip_packaging: 如果设置,将跳过打包步骤。
  • skip_existing: 如果设置,将跳过已存在的发布/标签的包上传。
  • skip_upload: 如果设置,将跳过上传步骤。
  • mark_as_latest: 如果设置为 false,将不会将创建的 GitHub 发布标记为 'latest'。
  • packages_with_index: 如果设置为 true,将直接将图表包上传到发布分支。
  • `

chart-releaser-actionA GitHub Action to turn a GitHub project into a self-hosted Helm chart repo, using helm/chart-releaser CLI tool项目地址:https://gitcode.com/gh_mirrors/ch/chart-releaser-action

  • 6
    点赞
  • 9
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

龚翔林Shannon

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值