--- # 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@a9a36fb08ce06db9b02fbd8026cc2c0945eb9841 # v0.6.0 with: patterns: kubernetes/**/* flate: if: ${{ needs.filter.outputs.changed-files != '[]' }} needs: filter name: Flate runs-on: ubuntu-latest steps: - name: Checkout uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 with: persist-credentials: false fetch-depth: 0 - name: Install Flate uses: home-operations/flate/action@631b76b69c4e58c6f4d1cb01e23616fa61aebafa # v0.6.5 - name: Run Flate id: flate run: flate test all -p ./kubernetes/flux/cluster 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')) }} run: echo "All jobs passed or skipped" && echo "${{ toJSON(needs.*.result) }}"