Skip to content

Commit

Permalink
fix: sync chart.lock (#184)
Browse files Browse the repository at this point in the history
Co-authored-by: hspitzley-czi <hspitzley-czi@users.noreply.github.com>
  • Loading branch information
hspitzley-czi and hspitzley-czi authored Jan 16, 2025
1 parent 572edb4 commit 2242ee4
Show file tree
Hide file tree
Showing 3 changed files with 63 additions and 3 deletions.
59 changes: 59 additions & 0 deletions .github/workflows/chart-dependency-update.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
name: Update Chart Dependencies

on:
push:
branches-ignore:
- main

jobs:
update_chart_locks:
runs-on: [ARM64, self-hosted, Linux]
steps:
- name: Generate token
id: generate_token
uses: tibdex/github-app-token@v2
with:
app_id: ${{ secrets.CZI_RELEASE_PLEASE_APP_ID }}
private_key: ${{ secrets.CZI_RELEASE_PLEASE_PK }}
- name: Checkout
uses: actions/checkout@v4
with:
token: ${{ steps.generate_token.outputs.token }}
- uses: dorny/paths-filter@v3
id: filter
with:
initial-fetch-depth: '1'
list-files: json
filters: |
changed:
- added|modified: '**'
- uses: actions/github-script@v7
id: changed_charts
with:
script: |
const fs = require('fs');
const path = require("path");
const changedFiles = ${{ steps.filter.outputs.changed_files }}
const changedDirs = changedFiles.map(f => path.dirname(f)).filter(dir => fs.existsSync(path.join(dir, 'Chart.yaml')));
const uniqueChangedDirs = [...new Set(changedDirs)];
console.log(`Found the following changed charts: ${JSON.stringify(uniqueChangedDirs, null, 2)}\n OG: ${JSON.stringify(changedFiles, null, 2)} `)
core.setOutput('changed_chart_dirs', uniqueChangedDirs)
core.setOutput('changed_chart_dirs_bash', uniqueChangedDirs.join(' '));
- uses: azure/setup-helm@v4
with:
version: '3.15.2'
- name: Update Chart.lock
run: |
for chart in ${{ steps.changed_charts.outputs.changed_chart_dirs_bash }}
do
echo "----------------------------------------"
echo "Updating ${chart}/Chart.lock"
helm dependency update ${chart}
git diff ${chart}/Chart.lock
done
- name: Commit changes
uses: EndBug/add-and-commit@v9
with:
add: -A
message: 'ci - update chart dependencies'
6 changes: 3 additions & 3 deletions stack/Chart.lock
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
dependencies:
- name: argus-config
repository: https://chanzuckerberg.github.io/argo-helm-charts
version: 1.2.2
digest: sha256:afb15fcb39ffb988cfedf083ba5a0744b79a9b681b37c0dadd01c5b8e6619daf
generated: "2024-12-12T15:33:03.662519-08:00"
version: 1.2.3
digest: sha256:135c63aaedf8051fd40aea2d38bdb802dd84df8273b4b2559b1728a905304ffd
generated: "2025-01-16T20:36:45.55191235Z"
1 change: 1 addition & 0 deletions stack/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -274,6 +274,7 @@ global:
name: __ARGUS
## @param global.env[0].value Environment variable value
value: "true"

## @param global.envFrom Environment variables from configmaps or secrets
envFrom: []

Expand Down

0 comments on commit 2242ee4

Please sign in to comment.