Skip to content

Commit

Permalink
Don't run chart install tests if nothing has changed
Browse files Browse the repository at this point in the history
  • Loading branch information
jeff-french committed Dec 31, 2023
1 parent 88ca890 commit 6626461
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .github/workflows/lint-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -48,21 +48,25 @@ 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
uses: teleport-actions/auth@v2
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..."
Expand All @@ -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
Expand Down

0 comments on commit 6626461

Please sign in to comment.