flux-local update

This commit is contained in:
auricom
2024-03-26 21:29:03 +01:00
parent 6078e6d25b
commit 130a0321c6
2 changed files with 15 additions and 13 deletions

View File

@@ -1,11 +1,11 @@
--- ---
# yaml-language-server: $schema=https://json.schemastore.org/github-workflow.json # yaml-language-server: $schema=https://json.schemastore.org/github-workflow.json
name: "Flux Diff" name: Flux Diff
on: on:
pull_request: pull_request:
branches: ["main"] branches: [main]
paths: ["kubernetes/**"] paths: [kubernetes/**]
concurrency: concurrency:
group: ${{ github.workflow }}-${{ github.event.number || github.ref }} group: ${{ github.workflow }}-${{ github.event.number || github.ref }}
@@ -19,7 +19,7 @@ jobs:
pull-requests: write pull-requests: write
strategy: strategy:
matrix: matrix:
resources: ["helmrelease", "kustomization"] resources: [helmrelease, kustomization]
max-parallel: 4 max-parallel: 4
fail-fast: false fail-fast: false
steps: steps:
@@ -48,7 +48,7 @@ jobs:
path: pull path: pull
- name: Diff Resources - name: Diff Resources
uses: docker://ghcr.io/allenporter/flux-local:main uses: docker://ghcr.io/allenporter/flux-local:v4.3.1
with: with:
args: >- args: >-
--log-level DEBUG --log-level DEBUG
@@ -85,7 +85,7 @@ jobs:
# Summarize matrix https://github.community/t/status-check-for-a-matrix-jobs/127354/7 # Summarize matrix https://github.community/t/status-check-for-a-matrix-jobs/127354/7
flux-diff-success: flux-diff-success:
if: ${{ always() }} if: ${{ always() }}
needs: ["flux-diff"] needs: [flux-diff]
name: Flux Diff Successful name: Flux Diff Successful
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:

View File

@@ -1,11 +1,11 @@
--- ---
# yaml-language-server: $schema=https://json.schemastore.org/github-workflow.json # yaml-language-server: $schema=https://json.schemastore.org/github-workflow.json
name: "Flux Image Test" name: Flux Image Test
on: on:
pull_request: pull_request:
branches: ["main"] branches: [main]
paths: ["kubernetes/**"] paths: [kubernetes/**]
concurrency: concurrency:
group: ${{ github.workflow }}-${{ github.event.number || github.ref }} group: ${{ github.workflow }}-${{ github.event.number || github.ref }}
@@ -48,7 +48,7 @@ jobs:
path: pull path: pull
- name: Gather Images in Default Branch - name: Gather Images in Default Branch
uses: docker://ghcr.io/allenporter/flux-local:main uses: docker://ghcr.io/allenporter/flux-local:v4.3.1
with: with:
args: >- args: >-
get cluster get cluster
@@ -58,7 +58,7 @@ jobs:
--output-file default.yaml --output-file default.yaml
- name: Gather Images in Pull Request Branch - name: Gather Images in Pull Request Branch
uses: docker://ghcr.io/allenporter/flux-local:main uses: docker://ghcr.io/allenporter/flux-local:v4.3.1
with: with:
args: >- args: >-
get cluster get cluster
@@ -86,12 +86,14 @@ jobs:
images=$(jo -a $(grep -vf default.txt pull.txt)) images=$(jo -a $(grep -vf default.txt pull.txt))
echo "images=${images}" >> $GITHUB_OUTPUT echo "images=${images}" >> $GITHUB_OUTPUT
echo "${images}" echo "${images}"
echo "### Images" >> $GITHUB_STEP_SUMMARY
echo "${images}" | jq -r 'to_entries[] | "* \(.value)"' >> $GITHUB_STEP_SUMMARY
test-images: test-images:
if: ${{ needs.extract-images.outputs.matrix != '[]' }} if: ${{ needs.extract-images.outputs.matrix != '[]' }}
name: Test images name: Test images
runs-on: ubuntu-latest runs-on: ubuntu-latest
needs: ["extract-images"] needs: [extract-images]
strategy: strategy:
matrix: matrix:
images: ${{ fromJSON(needs.extract-images.outputs.matrix) }} images: ${{ fromJSON(needs.extract-images.outputs.matrix) }}
@@ -104,7 +106,7 @@ jobs:
# Summarize matrix https://github.community/t/status-check-for-a-matrix-jobs/127354/7 # Summarize matrix https://github.community/t/status-check-for-a-matrix-jobs/127354/7
test-images-success: test-images-success:
if: ${{ always() }} if: ${{ always() }}
needs: ["test-images"] needs: [test-images]
name: Test Images Successful name: Test Images Successful
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps: