Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

use action with Kustomize #19

Open
Plork opened this issue Dec 9, 2022 · 3 comments
Open

use action with Kustomize #19

Plork opened this issue Dec 9, 2022 · 3 comments
Labels
documentation Improvements or additions to documentation help wanted Extra attention is needed question Further information is requested

Comments

@Plork
Copy link

Plork commented Dec 9, 2022

how do we use this with Kustomize repos?

@janisz janisz added documentation Improvements or additions to documentation help wanted Extra attention is needed question Further information is requested labels Dec 9, 2022
@skabashnyuk
Copy link

This is a great question. Has the same issue.

@Plork
Copy link
Author

Plork commented Jan 27, 2023

I created a "composite" action in our organization that is a copy of this action.

I added this:

        set -u
        if [[ -z "${{ inputs.config }}" ]]; then
          CONFIG=""
        else
          CONFIG="--config ${{ inputs.config }}"
        fi
        if [[ "${{ inputs.kustomize }}" = "true" ]]; then
          ./kustomize build "${{ inputs.directory }}" | ./kube-linter $CONFIG lint - --format "${{ inputs.format }}"  | tee "${{ inputs.output-file }}"
        else
          ./kube-linter $CONFIG lint "${{ inputs.directory }}" --format "${{ inputs.format }}" | tee "${{ inputs.output-file }}"
        fi

https://docs.github.com/en/actions/creating-actions/creating-a-composite-action

@skabashnyuk
Copy link

The problem that I faced is that in that case error is generated for the file that is not in the git repository. It is generated only during the build.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation help wanted Extra attention is needed question Further information is requested
Projects
None yet
Development

No branches or pull requests

3 participants