Skip to content

interest in having a release via GHA? #72

@jessebot

Description

@jessebot

Hoi and thanks for maintaining this helm chart! :)

I setup a demo at jessebot/mastodon-helm-chart on how to setup a release via github-pages using the helm/chart-releaser-action. I can submit a pull request with that if you'd like. In the demo I have on my fork of this repo, I'm also using the latest versions of the bitnami oci compliant helm charts, but I would remove that from a potential PR on this topic to keep it scoped properly.

The gist of the required changes would be:

  • create charts/mastodon directory
  • move templates/, values.yaml, dev-values.yaml, Chart.yaml, and Chart.lock into charts/mastodon
  • create a branch called gh-pages
  • under ⚙️ Settings > Actions > Workflow Permissions select "Read and write permissions"
Workflow permissions screenshot reads Choose the default permissions granted to the GITHUB_TOKEN when running workflows in this repository. You can specify more granular permissions in the workflow using YAML. Learn more. https://docs.github.com/actions/reference/authentication-in-a-workflow#modifying-the-permissions-for-the-github_token Option selected is: Workflows have read and write permissions in the repository for all scopes. - create a workflow file in `.github/workflows/release.yaml` something like this:
name: Release Chart
concurrency: chart_releaser

on:
  push:
    branches:
      - main
    paths-ignore:
      - '.github/**'
      - '**/README.md'
      - 'LICENSE'

jobs:
  release:
    runs-on: ubuntu-22.04
    steps:
      - name: Checkout
        uses: actions/checkout@v3

      - name: Fetch history
        run: git fetch --prune --unshallow

      - name: Configure Git
        run: |
          git config user.name "$GITHUB_ACTOR"
          git config user.email "$GITHUB_ACTOR@users.noreply.github.com"

      # See https://github.com/helm/chart-releaser-action/issues/6
      - name: Set up Helm
        uses: azure/setup-helm@v3.5
        with:
          version: v3.11.1

      - name: Add dependency chart repos
        run: |
          helm dep update charts/mastodon

      - name: Run chart-releaser
        uses: helm/chart-releaser-action@v1.5.0
        env:
          CR_GENERATE_RELEASE_NOTES: true
          CR_TOKEN: "${{ secrets.GITHUB_TOKEN }}"

This is not dissimilar to what we're doing over in the community lead nextcloud/helm repo. The only caveat is that you still have to remember to manually bump the helm chart version each time in any commits you merge.

This isn't urgent or required for me right now, but it would be nice to have more official releases :)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions