-
Notifications
You must be signed in to change notification settings - Fork 1.6k
40 lines (38 loc) · 1.18 KB
/
refresh_helm_lock_file.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
name: 'Referesh Chart.lock'
on:
pull_request_target:
branches:
- dev
paths:
- 'helm/defectdojo/Chart.yaml'
permissions:
contents: write
jobs:
update-chart-lock:
runs-on: ubuntu-latest
steps:
- name: Checkout bitnami/charts
uses: actions/checkout@v4
with:
ref: ${{github.event.pull_request.head.ref}}
repository: ${{github.event.pull_request.head.repo.full_name}}
path: charts
token: ${{ secrets.GITHUB_TOKEN }}
- name: Set up Helm
uses: azure/setup-helm@v4
with:
version: v3.4.0
- name: Execute generate new Chart.lock file
run: |
helm repo add bitnami https://charts.bitnami.com/bitnami
helm dependency list ./charts/helm/defectdojo
helm dependency update ./charts/helm/defectdojo
- name: Push changes
run: |
# Push all the changes
cd charts
if git status -s | grep helm; then
git config user.name "DefectDojo"
git config user.email "[email protected]"
git add . && git commit -am "Update helm lock file" --signoff && git push
fi