# Update the GitHub Actions in a Helm Chart Repository

Yes. An agent moves your Helm repo's chart-testing and chart-releaser workflows to current action versions, drops deprecated syntax and opens a PR with lint passing.

[Run this on Rush](https://cloud.getrush.ai/run/update-github-actions/helm/). Opens the console with this prompt ready to send, in a Project that has your repository.

## What the agent does

The agent reads the workflows and the chart they test. In a repository like helm/examples, `ct.yaml` points chart-testing at the `charts` directory with `origin` as the remote, and the single chart `charts/hello-world` is `apiVersion: v2`, version 0.1.0, `appVersion` 1.16.0, an nginx Deployment with liveness and readiness probes, a ServiceAccount and a ClusterIP Service on port 80. `.github/workflows/lint-test.yaml` runs on `pull_request`: `actions/checkout@v2` with `fetch-depth: 0`, `azure/setup-helm@v1`, `actions/setup-python@v2` pinned to Python 3.7, `helm/chart-testing-action@v2.0.1`, a `list-changed` step that writes `::set-output name=changed::true`, `ct lint`, then `helm/kind-action@v1.0.0` and `ct install` only when a chart changed. `.github/workflows/release.yaml` runs on push to `main` with `actions/checkout@v2`, `azure/setup-helm@v1` and `helm/chart-releaser-action@v1.2.0` using `GITHUB_TOKEN` as `CR_TOKEN`.

For each action it looks up the current major release with `gh api repos/<owner>/<repo>/releases/latest` and reads the release notes between the pinned version and that one, so the pull request can say what changed rather than just the number. Then it edits both files: the `uses` lines move to the current majors, the `::set-output` command, which GitHub deprecated, becomes `echo "changed=true" >> "$GITHUB_OUTPUT"`, and Python 3.7 becomes a current `python-version` since chart-testing only needs an interpreter for its `yamllint` and `yamale` checks. Each job gets an explicit `permissions` block, `contents: read` for lint-test and `contents: write` for release because chart-releaser pushes to the `gh-pages` branch, and a `concurrency` group so two pushes do not release at once. If the prompt asks for SHA pinning, every `uses` becomes a commit SHA with the version in a trailing comment.

The agent also adds `.github/dependabot.yml` with a `github-actions` ecosystem entry so the versions do not drift again, and leaves `ct.yaml` and the chart untouched. Then it checks the result the way CI will: `actionlint` over both workflow files, `helm lint charts/hello-world`, `helm template` to render the Deployment, Service and ServiceAccount, and `ct lint --all --config ct.yaml` with chart-testing installed in the sandbox, which also runs the `Chart.yaml` schema check and the version-increment check against `origin`.

One honest limit is written into the pull request. The updated `lint-test.yaml` runs on the pull request itself, but because only workflow files changed, `ct list-changed` finds no chart and the kind install step is skipped, so the green run proves the lint path and the syntax, not the install path. When the prompt asks for the install path too, the agent installs Docker in the sandbox (`sudo apt-get install -y docker.io`, then starts `dockerd`), creates a kind cluster and runs `ct install --all`, and pastes that output instead.

## Start it with one API call

`POST https://api.phoenix.so/o/{org}/sessions`

```json
{
  "agent": "claude",
  "input": "Update the GitHub Actions in this Helm chart repository. Read ct.yaml, every file under .github/workflows and the chart under charts first. For each action used, look up the current major release with gh api and read what changed since the pinned version. Move every uses line to the current major, replace the deprecated ::set-output command with GITHUB_OUTPUT, replace the pinned Python 3.7 with a current version, add least-privilege permissions blocks to each job with contents write only where chart-releaser pushes, add a concurrency group to the release workflow, and add a dependabot.yml for github-actions. Do not change the charts or ct.yaml. Run actionlint on both workflows, helm lint and helm template on each chart, and ct lint --all with chart-testing installed. Open a pull request that lists each action with its old and new version and one line on what changed, and say plainly that the kind install step does not run on a workflow-only change.",
  "resources": [
    {
      "url": "https://github.com/your-org/your-app"
    }
  ]
}
```

1. **Get an API key.** In the console, open Settings, then API keys, and create a key for your org. Send it in the Authorization header as a Bearer token.
2. **Send the request.** POST the body in request.json to https://api.phoenix.so/o/{org}/sessions, with your repository as the resources URL. The run starts in its own cloud sandbox.
3. **Read what came back.** Follow the run on its live stream or wait for the run.completed webhook, then read the result and its trajectory.

## What comes back

What comes back is a pull request on its own branch with the two edited files under `.github/workflows/` and a new `.github/dependabot.yml`. `ct.yaml`, `Chart.yaml`, `values.yaml` and the templates are untouched, so the chart version does not move.

The description is a table of every action with its old and new version and one line on what changed in between, the `set-output` replacement, the permissions added to each job, and the `actionlint`, `helm lint` and `ct lint` output. The commands are in the transcript at `GET /o/{org}/sessions/{id}/messages`, and the updated lint-test workflow's own run on the pull request is visible in the Actions tab.

Before merging, a reviewer confirms the release workflow still has write access to the `gh-pages` branch under the new `permissions` block, decides whether to pin by SHA, and may bump the chart version in a follow-up pull request to watch the kind install path run under the new action versions.

## Run it on every Monday morning

An automation with a `schedule` trigger starts one run a week with this prompt in the Project that holds the chart repository. Each run looks up the current releases itself, so the prompt never needs a version in it, and a week with nothing to update ends with a report and no pull request.

Each run has its own sandbox and its own branch, and an automation run has its own `max_runs_per_hour` cap. For a team with several chart repositories, one automation per Project keeps each pull request scoped to one repository.

## Why run it on Rush?

Updating actions by hand is a tab per repository: find the latest tag, open the release notes, check whether the deprecated output syntax still works, push, wait for the run. The agent does the lookups with `gh api`, reads the notes, and runs `actionlint` and `ct lint` in its own sandbox with Helm and chart-testing installed, so the version you review has already passed the same checks CI runs.

The result says what it did not prove as clearly as what it did: the install path is skipped on a workflow-only change, and the pull request states that rather than claiming a full green. Several chart repositories can be updated at once, each in its own sandbox, with one pull request each.

## Frequently asked questions

### Will the release workflow still publish charts?

Yes. `chart-releaser-action` keeps using `GITHUB_TOKEN` as `CR_TOKEN`, and the new `permissions: contents: write` on that job is what lets it push to `gh-pages` once the repository's default token permissions are read-only. The pull request calls that line out for the reviewer.

### Why does the kind install step not run on the pull request?

`ct list-changed` compares the branch against `origin` and lists charts whose files changed. A pull request that edits only workflow files changes no chart, so the step is skipped by design. Bumping `version` in `Chart.yaml` in a later pull request exercises it, or the agent runs `ct install` on a kind cluster in the sandbox when asked.

### Does the agent pin actions to SHAs?

By default it moves to the current major tag, which is what the repository used before. If the prompt asks for SHA pinning, each `uses` line becomes the commit the tag points at with the version in a comment, and the `dependabot.yml` it adds keeps those SHAs current.

### Why is Python in a Helm workflow at all?

chart-testing's `ct lint` runs `yamllint` and `yamale` for the `Chart.yaml` schema and YAML style checks, and both are Python tools. The workflow only needs an interpreter present, so the agent replaces the Python 3.7 pin with a current version rather than removing the step.

## More Helm jobs

- [Upgrade Helm Chart Dependencies](https://getrush.ai/run/upgrade-chart-dependencies/helm/)
- [Write Unit Tests for a Helm Chart](https://getrush.ai/run/write-helm-unittest/helm/)
- [Add chart-testing and a kind Install Test to a Helm Chart's CI](https://getrush.ai/run/add-chart-testing/helm/)

## The same job on other stacks

- [Update the GitHub Actions in a Node.js Repository's Workflows](https://getrush.ai/run/update-github-actions/nodejs/)
- [Update Pinned GitHub Actions in a Rust Repo](https://getrush.ai/run/update-github-actions/rust/)
- [Update the GitHub Actions in a Rust CLI's Workflows](https://getrush.ai/run/update-github-actions/rust-cli/)

## Keep reading

- [How a Rush run works on your repository, from request to pull request](https://getrush.ai/cloud/)
- [Compare cloud agents, agent sandboxes and AI code review](https://getrush.ai/compare/)
- [Rush pricing: Free, Pro and Max](https://getrush.ai/pricing/)
