Fixup the kyverno chart bogus version #52
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: cache-updated | |
on: | |
push: | |
branches: [master] | |
permissions: | |
contents: write | |
jobs: | |
cache-updated: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
- uses: nrwl/nx-set-shas@v3 | |
id: last_successful_commit_push | |
with: | |
main-branch-name: master | |
workflow-id: 'cache-updated.yml' | |
- id: changed-files | |
uses: tj-actions/changed-files@v35 | |
with: | |
files: charts/** | |
base_sha: ${{ steps.last_successful_commit_push.outputs.base }} | |
- uses: fregante/setup-git-user@v2 | |
if: steps.changed-files.outputs.any_changed == 'true' | |
- name: Install Nix | |
uses: cachix/install-nix-action@v20 | |
if: steps.changed-files.outputs.any_changed == 'true' | |
with: | |
extra_nix_config: 'experimental-features = nix-command flakes' | |
nix_path: nixpkgs=channel:nixos-unstable | |
- uses: cachix/cachix-action@v12 | |
if: steps.changed-files.outputs.any_changed == 'true' | |
with: | |
name: nixhelm | |
authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}' | |
- name: Check for updates | |
if: steps.changed-files.outputs.any_changed == 'true' | |
run: | | |
for CHANGED_FILE in ${{ steps.changed-files.outputs.added_files }}; do | |
if [[ "$CHANGED_FILE" =~ charts/(.+/.+)/default.nix$ ]]; then | |
CHART="${BASH_REMATCH[1]}" | |
echo "rebuilding for $CHART" | |
nix run .#helmupdater -- update "$CHART" --commit --rebuild | |
fi | |
done |