From 158cf2faa44efcbf509d79a03a54dae65cb6c642 Mon Sep 17 00:00:00 2001 From: jessebot Date: Wed, 29 May 2024 14:03:42 +0200 Subject: [PATCH 1/4] only run chart linting for specific files instead of trying to catch every exception Signed-off-by: jessebot --- .github/workflows/lint-test.yaml | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/.github/workflows/lint-test.yaml b/.github/workflows/lint-test.yaml index 45739610..d9b53a4e 100644 --- a/.github/workflows/lint-test.yaml +++ b/.github/workflows/lint-test.yaml @@ -2,14 +2,10 @@ name: Lint and Test Charts on: pull_request: - paths-ignore: - - '.github/**' - - 'charts/**/README.md' - - 'CODE_OF_CONDUCT.md' - - 'CONTRIBUTING.md' - - 'LICENSE' - - 'README.md' - + paths: + - 'charts/nextcloud/Chart.yaml' + - 'charts/nextcloud/values.yaml' + - 'charts/nextcloud/templates/**' jobs: lint-test: runs-on: ubuntu-22.04 From 7d52bf19f409aec1d3be0d4c4d5f9de2791468a8 Mon Sep 17 00:00:00 2001 From: jessebot Date: Wed, 29 May 2024 14:59:18 +0200 Subject: [PATCH 2/4] attempt to adapt changes from https://github.com/nextcloud/.github/blob/master/workflow-templates/node.yml Signed-off-by: jessebot --- .github/workflows/lint-test.yaml | 35 +++++++++++++++++++++++++++++--- 1 file changed, 32 insertions(+), 3 deletions(-) diff --git a/.github/workflows/lint-test.yaml b/.github/workflows/lint-test.yaml index d9b53a4e..c8ef2e15 100644 --- a/.github/workflows/lint-test.yaml +++ b/.github/workflows/lint-test.yaml @@ -3,12 +3,27 @@ name: Lint and Test Charts on: pull_request: paths: - - 'charts/nextcloud/Chart.yaml' - - 'charts/nextcloud/values.yaml' - - 'charts/nextcloud/templates/**' jobs: + changes: + runs-on: ubuntu-latest-low + + outputs: + src: ${{ steps.changes.outputs.src}} + + 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 @@ -48,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 From bbfcd156885a0256f57e0b94627e2d0cac82ccc2 Mon Sep 17 00:00:00 2001 From: jessebot Date: Wed, 29 May 2024 15:12:23 +0200 Subject: [PATCH 3/4] add needs: changes to lint job Signed-off-by: jessebot --- .github/workflows/lint-test.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/lint-test.yaml b/.github/workflows/lint-test.yaml index c8ef2e15..71a08479 100644 --- a/.github/workflows/lint-test.yaml +++ b/.github/workflows/lint-test.yaml @@ -23,6 +23,7 @@ jobs: lint-test: runs-on: ubuntu-22.04 + needs: changes if: needs.changes.outputs.src != 'false' steps: - name: Checkout From 5f8d39be15749e750923eb6c29807c6c174e2e4b Mon Sep 17 00:00:00 2001 From: jessebot Date: Wed, 29 May 2024 15:37:13 +0200 Subject: [PATCH 4/4] remove summary job afterall Signed-off-by: jessebot --- .github/workflows/lint-test.yaml | 14 -------------- 1 file changed, 14 deletions(-) diff --git a/.github/workflows/lint-test.yaml b/.github/workflows/lint-test.yaml index 71a08479..14c37ceb 100644 --- a/.github/workflows/lint-test.yaml +++ b/.github/workflows/lint-test.yaml @@ -64,17 +64,3 @@ 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