From 66264610b660c9f3df441346d631f54e462557f2 Mon Sep 17 00:00:00 2001 From: Jeff French Date: Sun, 31 Dec 2023 15:28:34 -0600 Subject: [PATCH] Don't run chart install tests if nothing has changed --- .github/workflows/lint-test.yaml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/workflows/lint-test.yaml b/.github/workflows/lint-test.yaml index b88d348..919db95 100644 --- a/.github/workflows/lint-test.yaml +++ b/.github/workflows/lint-test.yaml @@ -48,6 +48,7 @@ jobs: uses: teleport-actions/setup@v1 with: version: 14.2.3 + if: steps.list-changed.outputs.changed == 'true' - name: Fetch credentials using Machine ID id: auth @@ -55,14 +56,17 @@ jobs: with: proxy: teleport.prd.moonswitch.io:443 token: moonswitch-automation + if: steps.list-changed.outputs.changed == 'true' - name: Create teleport join token for cluster + if: steps.list-changed.outputs.changed == 'true' run: | token=$(tctl tokens add --type=kube --format=json | jq -r '.token') echo "::add-mask::$token" echo "TELEPORT_TOKEN=$token" >> $GITHUB_ENV - name: Create teleport join token secret in cluster + if: steps.list-changed.outputs.changed == 'true' run: | # Create moonswitch namespace and teleport secret echo "Creating 'moonswitch' namespace..." @@ -72,6 +76,7 @@ jobs: kubectl --namespace moonswitch create secret generic teleport-kube-agent-join-token --from-literal=auth-token=${TELEPORT_TOKEN} --dry-run=client -o yaml | kubectl apply -f - - name: Run chart-testing (install) + if: steps.list-changed.outputs.changed == 'true' run: ct install --config ct.yaml - name: Remove Teleport token