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

only run chart linting for specific files instead of trying to catch every exception #575

Merged
merged 4 commits into from
May 29, 2024
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
41 changes: 33 additions & 8 deletions .github/workflows/lint-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,28 @@ name: Lint and Test Charts

on:
pull_request:
paths-ignore:
- '.github/**'
- 'charts/**/README.md'
- 'CODE_OF_CONDUCT.md'
- 'CONTRIBUTING.md'
- 'LICENSE'
- 'README.md'

paths:
jobs:
changes:
runs-on: ubuntu-latest-low

outputs:
src: ${{ steps.changes.outputs.src}}
provokateurin marked this conversation as resolved.
Show resolved Hide resolved

steps:
- uses: dorny/paths-filter@de90cc6fb38fc0963ad72b210f1f284cd68cea36 # v3.0.2
id: changes
continue-on-error: true
with:
filters: |
src:
- 'charts/nextcloud/Chart.yaml'
- 'charts/nextcloud/values.yaml'
- 'charts/nextcloud/templates/**'

lint-test:
runs-on: ubuntu-22.04
if: needs.changes.outputs.src != 'false'
steps:
- name: Checkout
uses: actions/checkout@v4
Expand Down Expand Up @@ -52,3 +63,17 @@ jobs:
id: install
if: steps.list-changed.outputs.changed == 'true'
run: ct install --target-branch ${{ github.event.repository.default_branch }}

summary:
permissions:
contents: none
runs-on: ubuntu-latest-low
if: always()
needs: [changes]

# This is the summary, we just avoid to rename it so that branch protection rules still match
name: Lint and Test Charts

steps:
- name: Summary status
run: if ${{ needs.changes.outputs.src != 'false' }}; then exit 1; fi
jessebot marked this conversation as resolved.
Show resolved Hide resolved
Loading