Skip to content
Open
Show file tree
Hide file tree
Changes from 39 commits
Commits
Show all changes
52 commits
Select commit Hold shift + click to select a range
c213ae2
feat(update-chart-dependency): implement action (MAPCO-8106)
shimoncohen Aug 5, 2025
dfc9f34
test(update-chart-dependency): add tests and update logic accordingly
shimoncohen Aug 5, 2025
810e132
chore(update-chart-dependency): upload action dist
shimoncohen Aug 5, 2025
a57dddb
fix(update-chart-dependency): support updating helmfile
shimoncohen Aug 5, 2025
002fb32
chore(update-chart-dependency): upload action dist
shimoncohen Aug 5, 2025
21cc069
chore: remove unnecessary variable default
shimoncohen Aug 6, 2025
8901300
refactor(update-chart-dependency): search for helmfile in chart direc…
shimoncohen Aug 11, 2025
f2466aa
chore: rename default branch from main to master
shimoncohen Aug 11, 2025
33b3023
chore: fix PR comments and add some comments
shimoncohen Aug 11, 2025
bc72fae
build: upgrade action node version to node24
shimoncohen Aug 11, 2025
bec894d
chore(update-chart-dependency): upload action dist
shimoncohen Aug 11, 2025
d63cad8
Update actions/update-chart-dependency/main.ts
shimoncohen Aug 12, 2025
fe62c82
Update actions/update-chart-dependency/main.ts
shimoncohen Aug 12, 2025
f8b4dce
Revert "Update actions/update-chart-dependency/main.ts"
shimoncohen Aug 12, 2025
13ebab1
Revert "Update actions/update-chart-dependency/main.ts"
shimoncohen Aug 12, 2025
dd7dd87
chore: change action input names
shimoncohen Aug 12, 2025
3e3c375
chore: update dist files
shimoncohen Aug 12, 2025
4efd6d2
refactor: add old and new chart versions to commit messages and PR body
shimoncohen Aug 12, 2025
cfae9e5
chore: use intrface from code in tests
shimoncohen Aug 12, 2025
521c11b
refactor: use flatMap instead of forEach
shimoncohen Aug 12, 2025
0a36646
chore: update dist files
shimoncohen Aug 12, 2025
8feb3a2
chore: add action flow diagram to README
shimoncohen Aug 12, 2025
5888cc0
fix: add target-repo action input
shimoncohen Aug 18, 2025
657b4d3
chore: add dist files
shimoncohen Aug 18, 2025
6bfe460
chore: update action.yaml to include target-repo input
shimoncohen Aug 19, 2025
6d231da
refactor: open PR for each directory
shimoncohen Aug 19, 2025
4e1776a
chore: update dist files
shimoncohen Aug 19, 2025
772faa3
feat: support searching for chart files in subdirectories
shimoncohen Aug 21, 2025
0c044a5
refactor: remove target chart prefix feature
shimoncohen Aug 21, 2025
fd63c1c
refactor: validate action inputs with zod
shimoncohen Aug 21, 2025
0c0d4c7
chore: update package.json with zod
shimoncohen Aug 21, 2025
dfb73ca
fix: look for chart / helmfile in remote repo
shimoncohen Aug 24, 2025
ba30758
chore: update function comment
shimoncohen Aug 24, 2025
a03e801
chore: upload package json
shimoncohen Aug 24, 2025
4808da7
Update actions/update-chart-dependency/README.md
shimoncohen Sep 2, 2025
285d538
Update actions/update-chart-dependency/README.md
shimoncohen Sep 2, 2025
dafe0c9
docs(update-chart-dependency): update action README
shimoncohen Sep 2, 2025
f8f284d
fix: updated log text in case no charts are found
shimoncohen Sep 2, 2025
be9fd0b
chore: use objects instead of strings and convert to yaml in tests
shimoncohen Sep 8, 2025
c02a312
refactor: change pull request to support only one chart update
shimoncohen Sep 15, 2025
a612e66
chore: change branch name to reflect chart heirarchy
shimoncohen Sep 15, 2025
1b2c76b
chore: update build
shimoncohen Sep 15, 2025
17b932b
chore: update some quotes in strings
shimoncohen Sep 16, 2025
e8a97d5
chore: remove temp cloned directory from branch name
shimoncohen Sep 16, 2025
706da68
chore: add chart or helmfile ending to branch name
shimoncohen Sep 16, 2025
f047f38
chore: use chart full path in PR body
shimoncohen Sep 16, 2025
28bad09
chore: chart path in PR title and body shouldn't be sanitized
shimoncohen Sep 16, 2025
abb7324
feat: update existing PR for the same chart if exists
shimoncohen Sep 17, 2025
d8279a2
test: add more tests for better coverage
shimoncohen Sep 17, 2025
86086b9
refactor: remove chart version from branch name
shimoncohen Sep 17, 2025
aadbf20
fix: use helmfile chart key instead of name
shimoncohen Sep 18, 2025
8d33580
feat: update PR information if it already exists and there is a newer…
shimoncohen Sep 18, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ This repository contains a collection of JavaScript-based GitHub Actions that ca

- [jira-integration](./actions/jira-integration) - Helps connecting pull requests to jira including comments on the pull request and title validation

- [update-chart-dependency](./actions/update-chart-dependency) - Update remote chart dependencies with a new service version

## Development

### Creating New Actions
Expand Down
45 changes: 45 additions & 0 deletions actions/update-chart-dependency/README.md
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The readme can also explain how to use it better (where the action itself sits, whats the target), maybe put a mermaid chart.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added diagram.

Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
# Update Helm Chart Dependencies GitHub Action

This GitHub Action updates the version of a specific dependency in the `Chart` and `helmfile` yaml files for one or more directories in a remote repository, and for each creates a dedicated branch with the chart changes and opens a pull request.

## Features

- Accepts a dependency service name and version as inputs.
- Finds all chart directories in a remote repository.
- Updates the version of the specified chart in all Chart.yaml and helmfile.yaml files where it is listed as a dependency.
- Creates new branches from a specified base branch.
- Creates a dedicated branch for each change and opens a PR with a summary of the update details.
- Uses only Node.js built-in modules and the official GitHub Actions toolkit.

## Inputs

| Name | Description | Required | Default |
| -------------- | ---------------------------------------------------------------- | -------- | -------- |
| `chart-name` | Name of the dependency to update in Chart / helmfile yaml files. | true | |
| `version` | New version to set for the dependency. | true | |
| `github-token` | GitHub token for authentication. | true | |
| `target-repo` | Target repository to open the PRs in (format: owner/repo). | true | |
| `branch` | Branch to base the PRs on (e.g. `master`). | false | `master` |

## Usage

```yaml
- name: Update Helm Chart Dependencies
uses: map-colonies/update-chart-dependency@v1
with:
chart-name: 'my-dependency'
version: '1.2.3'
github-token: ${{ secrets.GITHUB_TOKEN }}
target-repo: 'owner/repo'
branch: 'master'
```

## Notes

- The action updates only the version of the specified dependency in each chart's `Chart` and `helmfile` yaml files.
- The action opens a dedicated branch and PR for each updated chart.
- If no charts require updating, no PR will be opened.

## License

MIT
23 changes: 23 additions & 0 deletions actions/update-chart-dependency/action.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: 'Update Helm Chart Dependencies'
description: 'Updates Chart.yaml for Helm charts and opens a PR with the changes.'

runs:
using: 'node24'
main: 'dist/index.js'

inputs:
chart-name:
description: 'Name of the dependency to update in Chart / helmfile.'
required: true
version:
description: 'New version to set for the dependency.'
required: true
github-token:
description: 'GitHub token for authentication.'
required: true
target-repo:
description: 'Repository to update the chart in (format: owner/repo).'
required: true
branch:
description: 'Branch to base the PR on (default: master).'
required: false
46,053 changes: 46,053 additions & 0 deletions actions/update-chart-dependency/dist/index.js

Large diffs are not rendered by default.

3 changes: 3 additions & 0 deletions actions/update-chart-dependency/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
import { run } from './main.js';

void run();
Loading
Loading