NOTE: this project was inspired by hckops!
To test it, fork this repo. I recommend you to fork the main branch only.
NOTE: you need to change the workflow permissions from Read repository contents and package permissions
to Read and write permissions
under your repository (Settings -> Actions -> General -> Workflow permissions). You have also to set Allow GitHub Actions to create and approve pull request
You can keep the config like:
name: test-helm-dependencies
on:
# enable manual trigger
workflow_dispatch:
schedule:
- cron: "0 0 * * *"
push:
branches:
- main
paths:
- ".github/workflows/test-helm-dependencies.yml"
- "helm-dependencies/**"
- "examples/dependencies.yaml"
jobs:
test-helm-dependencies:
name: Test Example Chart
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
#with:
# ref: main
- name: Helm Dependencies
uses: ./helm-dependencies
with:
config-path: examples/dependencies.yaml
user-email: "[email protected]"
user-name: "dep-sheriff-bot"
default-branch: "main"
dry-run: false
github-run: true
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
The Action will be triggered on push to main or every 12 hours as cronjob.
You will get an output like:
You need only to set the github-run
flag to false
and the dry-run
flag to true
like:
name: test-helm-dependencies
on:
# enable manual trigger
workflow_dispatch:
schedule:
- cron: "0 0 * * *"
push:
branches:
- main
paths:
- ".github/workflows/test-helm-dependencies.yml"
- "helm-dependencies/**"
- "examples/dependencies.yaml"
jobs:
test-helm-dependencies:
name: Test Example Chart
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
#with:
# ref: main
- name: Helm Dependencies
uses: ./helm-dependencies
with:
config-path: examples/dependencies.yaml
user-email: "[email protected]"
user-name: "dep-sheriff-bot"
default-branch: "main"
dry-run: true
github-run: false
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
The Action will be triggered on push to main or every 12 hours as cronjob.
You will get an output like:
create a dependencies.yaml
like:
dependencies:
- name: "External DNS"
arrayPosition: 0
sourcePath: examples/test-helm-chart/external-dns
repositoryName: bitnami/external-dns
Create file .github/workflows/helm-dependencies-update.yml
name: helm-dependencies-update
on:
workflow_dispatch:
schedule:
- cron: "0 0 * * *"
push:
branches:
- main
paths:
- ".github/workflows/helm-dependencies-update.yml"
- "dependencies.yaml"
jobs:
test-helm-dependencies:
name: "Test: Helm Dependencies Update on Example Chart"
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
#with:
# ref: main
- name: Helm Dependencies
uses: la-cc/gh-actions/[email protected]
with:
config-path: dependencies.yaml
user-email: "[email protected]"
user-name: "dep-sheriff-bot"
default-branch: "main"
dry-run: false
github-run: true
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}