Skip to content

feat(container): update image ghcr.io/grafana/helm-charts/grafana (10.2.0 → 10.3.0) #763

feat(container): update image ghcr.io/grafana/helm-charts/grafana (10.2.0 → 10.3.0)

feat(container): update image ghcr.io/grafana/helm-charts/grafana (10.2.0 → 10.3.0) #763

Workflow file for this run

---
name: Image Pull
on:
pull_request:
branches:
- main
concurrency:
group: ${{ github.workflow }}-${{ github.event.number || github.ref }}
cancel-in-progress: true
jobs:
filter:
name: Image Pull - Filter
runs-on: ubuntu-latest
outputs:
changed-files: ${{ steps.changed-files.outputs.changed_files }}
steps:
- name: Get Changed Files
id: changed-files
uses: bjw-s-labs/action-changed-files@1a5aeab1bfa64d0c4e786f501d5a3f1fad4a24da # v0.4.1
with:
patterns: kubernetes/**/*
extract:
if: ${{ needs.filter.outputs.changed-files != '[]' }}
needs: filter
name: Image Pull - Extract Images
runs-on: ubuntu-latest
strategy:
matrix:
branch:
- default
- pull
fail-fast: false
outputs:
default: ${{ steps.extract.outputs.default }}
pull: ${{ steps.extract.outputs.pull }}
steps:
- name: Checkout
uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0
with:
ref: ${{ matrix.branch == 'default' && github.event.repository.default_branch || '' }}
- name: Gather Images
uses: docker://ghcr.io/allenporter/flux-local:v8.0.0
with:
args: >-
get cluster
--all-namespaces
--path /github/workspace/kubernetes/flux/cluster
--enable-images
--only-images
--output json
--output-file images.json
- name: Extract Images
id: extract
run: echo "${{ matrix.branch }}=$(jq --compact-output '.' images.json)" >> $GITHUB_OUTPUT
diff:
if: ${{ needs.extract.outputs.default != needs.extract.outputs.pull }}
needs: extract
name: Image Pull - Diff Images
runs-on: ubuntu-latest
outputs:
images: ${{ steps.diff.outputs.images }}
steps:
- name: Diff Images
id: diff
run: |-
images=$(jq --compact-output --null-input \
--argjson f1 '${{ needs.extract.outputs.default }}' \
--argjson f2 '${{ needs.extract.outputs.pull }}' \
'$f2 - $f1' \
)
echo "images=${images}" >> $GITHUB_OUTPUT
pull:
if: ${{ needs.diff.outputs.images != '[]' }}
needs: diff
name: Image Pull - Pull Images
runs-on: k8s-gitops-runner
strategy:
matrix:
image: ${{ fromJSON(needs.diff.outputs.images) }}
max-parallel: 4
fail-fast: false
steps:
- name: Install talosctl
run: curl -fsSL https://talos.dev/install | sh
- name: Pull Image
run: talosctl --nodes $NODE image pull ${{ matrix.image }}
success:
if: ${{ !cancelled() }}
needs: pull
name: Image Pull - Success
runs-on: ubuntu-latest
steps:
- name: Any jobs failed?
if: ${{ contains(needs.*.result, 'failure') }}
run: exit 1
- name: All jobs passed or skipped?
if: ${{ !(contains(needs.*.result, 'failure')) }}
run: echo "All jobs passed or skipped" && echo "${{ toJSON(needs.*.result) }}"