Skip to content

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

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) #797

Workflow file for this run

---
name: Flux Local
on:
pull_request:
branches:
- main
concurrency:
group: ${{ github.workflow }}-${{ github.event.number || github.ref }}
cancel-in-progress: true
jobs:
filter:
name: Flux Local - 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/**/*
test:
if: ${{ needs.filter.outputs.changed-files != '[]' }}
needs: filter
name: Flux Local - Test
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0
- name: Run flux-local test
uses: docker://ghcr.io/allenporter/flux-local:v8.0.0
with:
args: >-
test
--all-namespaces
--enable-helm
--path /github/workspace/kubernetes/flux/cluster
--verbose
diff:
if: ${{ needs.filter.outputs.changed-files != '[]' }}
needs: filter
name: Flux Local - Diff
runs-on: ubuntu-latest
permissions:
contents: read
pull-requests: write
strategy:
matrix:
resource:
- helmrelease
- kustomization
fail-fast: false
steps:
- name: Checkout Pull Request Branch
uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0
with:
path: pull
- name: Checkout Default Branch
uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0
with:
ref: "${{ github.event.repository.default_branch }}"
path: default
- name: Run flux-local diff
uses: docker://ghcr.io/allenporter/flux-local:v8.0.0
with:
args: >-
diff ${{ matrix.resource }}
--unified 6
--path /github/workspace/pull/kubernetes/flux/cluster
--path-orig /github/workspace/default/kubernetes/flux/cluster
--strip-attrs "helm.sh/chart,checksum/config,app.kubernetes.io/version,chart"
--limit-bytes 10000
--all-namespaces
--sources "flux-system"
--output-file diff.patch
- name: Generate Diff
id: diff
run: |-
echo 'diff<<EOF' >> $GITHUB_OUTPUT
cat diff.patch >> $GITHUB_OUTPUT
echo 'EOF' >> $GITHUB_OUTPUT
- if: ${{ steps.diff.outputs.diff != '' }}
name: Generate Token
uses: actions/create-github-app-token@7e473efe3cb98aa54f8d4bac15400b15fad77d94 # v2.2.0
id: app-token
with:
app-id: ${{ secrets.BOT_APP_ID }}
private-key: ${{ secrets.BOT_APP_PRIVATE_KEY }}
- if: ${{ steps.diff.outputs.diff != '' }}
name: Add Comment
uses: marocchino/sticky-pull-request-comment@773744901bac0e8cbb5a0dc842800d45e9b2b405 # v2.9.4
with:
GITHUB_TOKEN: ${{ steps.app-token.outputs.token }}
header: ${{ github.event.pull_request.number }}/kubernetes/${{ matrix.resource }}
message: |-
```diff
${{ steps.diff.outputs.diff }}
```
success:
if: ${{ !cancelled() }}
needs: [test, diff]
name: Flux Local - 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) }}"