This is an automated email from the ASF dual-hosted git repository.

adoroszlai pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/ozone-helm-charts.git


The following commit(s) were added to refs/heads/main by this push:
     new 5b5e67b  HDDS-11834. Test chart on push events (#12)
5b5e67b is described below

commit 5b5e67b2b64f89fb7ea50072a950a8c18e45ce9d
Author: Doroszlai, Attila <[email protected]>
AuthorDate: Mon Dec 2 20:44:44 2024 +0100

    HDDS-11834. Test chart on push events (#12)
---
 .github/workflows/test.yaml | 26 +++++++++++++++++---------
 1 file changed, 17 insertions(+), 9 deletions(-)

diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml
index e30d960..bd436e4 100644
--- a/.github/workflows/test.yaml
+++ b/.github/workflows/test.yaml
@@ -1,6 +1,9 @@
 name: Test Charts
 
-on: pull_request
+on:
+  pull_request:
+    types: [opened, synchronize]
+  push:
 
 jobs:
   test:
@@ -24,22 +27,27 @@ jobs:
       - name: Set up chart-testing
         uses: ./.github/actions/chart-testing-action
 
-      - name: Run chart-testing (list-changed)
-        id: list-changed
+      - name: Find changes (PR)
+        if: github.event_name == 'pull_request'
         run: |
           changed=$(ct list-changed --target-branch ${{ github.base_ref }})
           if [[ -n "$changed" ]]; then
-            echo "changed=true" >> "$GITHUB_OUTPUT"
+            echo "test_scope=--target-branch ${{ github.base_ref }}" >> 
"$GITHUB_ENV"
           fi
 
+      - name: Find changes (push)
+        if: github.event_name != 'pull_request'
+        run: |
+          echo "test_scope=--all" >> "$GITHUB_ENV"
+
       - name: Run chart-testing (lint)
-        if: steps.list-changed.outputs.changed == 'true'
-        run: ct lint --target-branch ${{ github.base_ref }} 
--validate-maintainers=false --check-version-increment=false
+        if: env.test_scope != ''
+        run: ct lint ${{ env.test_scope }} --validate-maintainers=false 
--check-version-increment=false
 
       - name: Create kind cluster
-        if: steps.list-changed.outputs.changed == 'true'
+        if: env.test_scope != ''
         uses: ./.github/actions/kind-action
 
       - name: Run chart-testing (install)
-        if: steps.list-changed.outputs.changed == 'true'
-        run: ct install --target-branch ${{ github.base_ref }}
+        if: env.test_scope != ''
+        run: ct install ${{ env.test_scope }}


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to