Skip to content

Commit

Permalink
Add OCIRepository sources to flux diff and test actions (#217)
Browse files Browse the repository at this point in the history
Add OCIRepository sources argument to flux diff and test.
  • Loading branch information
allenporter authored May 30, 2023
1 parent 3279dac commit be2935e
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 0 deletions.
1 change: 1 addition & 0 deletions .github/workflows/flux-local-diff.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ jobs:
path: ${{ matrix.cluster_path }}
resource: ${{ matrix.resource }}
debug: true
sources: cluster=tests/testdata/cluster3
- name: PR Comments
uses: mshick/add-pr-comment@v2
if: ${{ steps.diff.outputs.diff != '' }}
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/flux-local-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,4 @@ jobs:
with:
enable-helm: true
enable-kyverno: false
sources: cluster=tests/testdata/cluster3
4 changes: 4 additions & 0 deletions action/diff/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,9 @@ inputs:
kustomize-build-flags:
description: Additional flags to pass to kustomize build
default: ''
sources:
description: OCIRepository source mappings like `cluster=./kubernetes/`
default: ''
outputs:
diff:
description: Output of the diff command or empty if there is no diff
Expand Down Expand Up @@ -79,6 +82,7 @@ runs:
--limit-bytes ${{ inputs.limit-bytes }} \
--all-namespaces \
--kustomize-build-flags="${{ inputs.kustomize-build-flags }}" \
--sources "${{ inputs.sources }}" \
>> $GITHUB_OUTPUT
echo "${delimiter}" >> $GITHUB_OUTPUT
shell: bash
4 changes: 4 additions & 0 deletions action/test/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,9 @@ inputs:
kustomize-build-flags:
description: Additional flags to pass to kustomize build
default: ''
sources:
description: OCIRepository source mappings like `cluster=./kubernetes/`
default: ''
runs:
using: "composite"
steps:
Expand Down Expand Up @@ -56,5 +59,6 @@ runs:
--${{ inputs.enable-kyverno != 'true' && 'no-' || '' }}enable-kyverno \
--api-versions "${{ inputs.api-versions }}" \
--kustomize-build-flags="${{ inputs.kustomize-build-flags }}" \
--sources "${{ inputs.sources }}" \
--path ${{ inputs.path }}
shell: bash

0 comments on commit be2935e

Please sign in to comment.