mirror of
https://github.com/immich-app/yucca-o11y.git
synced 2026-09-30 13:23:23 +08:00
74 lines
1.9 KiB
YAML
74 lines
1.9 KiB
YAML
---
|
|
# yaml-language-server: $schema=https://json.schemastore.org/github-workflow.json
|
|
name: "Flate"
|
|
|
|
on:
|
|
pull_request:
|
|
branches:
|
|
- main
|
|
|
|
concurrency:
|
|
group: ${{ github.workflow }}-${{ github.event.number || github.ref }}
|
|
cancel-in-progress: true
|
|
|
|
permissions:
|
|
contents: read
|
|
|
|
jobs:
|
|
filter:
|
|
name: Flate - 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@147be9638332cf68fd60714a610509d7a9360d60 # v0.7.0
|
|
with:
|
|
patterns: kubernetes/**/*
|
|
|
|
flate:
|
|
if: ${{ needs.filter.outputs.changed-files != '[]' }}
|
|
needs: filter
|
|
name: Flate - ${{ matrix.cluster }} - ${{ matrix.resource }}
|
|
runs-on: ubuntu-latest
|
|
strategy:
|
|
matrix:
|
|
cluster: ["staging", "production"]
|
|
resource: ["helmrelease", "kustomization"]
|
|
fail-fast: false
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
with:
|
|
fetch-depth: 0
|
|
persist-credentials: false
|
|
|
|
- name: Install Flate
|
|
uses: home-operations/flate/action@631b76b69c4e58c6f4d1cb01e23616fa61aebafa # v0.6.5
|
|
with:
|
|
cache: true
|
|
|
|
- name: Run Flate
|
|
env:
|
|
FLATE_PATH: ./kubernetes/clusters/${{ matrix.cluster }}
|
|
KIND: ${{ matrix.resource }}
|
|
run: flate test $KIND
|
|
|
|
success:
|
|
if: ${{ !cancelled() }}
|
|
needs:
|
|
- flate
|
|
name: Flate - 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')) }}
|
|
env:
|
|
RESULTS: ${{ toJSON(needs.*.result) }}
|
|
run: echo "All jobs passed or skipped" && echo "$RESULTS"
|