diff --git a/.github/workflows/checks.yml b/.github/workflows/checks.yml index 8e9a485b0..0dad0789b 100644 --- a/.github/workflows/checks.yml +++ b/.github/workflows/checks.yml @@ -162,12 +162,14 @@ jobs: name: Fetch main if necessary run: git fetch origin main:main - - name: Run chart-testing (list-changed) + - if: github.ref != 'refs/heads/main' + name: Run chart-testing (list-changed) id: list-changed run: | + set -x changed=$(devbox run -- ct list-changed --target-branch ${{ github.event.repository.default_branch }}) - if [[ -n "$changed" ]]; then - echo "changed=true" >> "$GITHUB_OUTPUT" + if [[ -n "${changed}" ]]; then + echo "changed=true" >> "${GITHUB_OUTPUT}" fi - if: steps.list-changed.outputs.changed == 'true' diff --git a/devbox.json b/devbox.json index 9b3b9cc1e..7cec1416a 100644 --- a/devbox.json +++ b/devbox.json @@ -1,41 +1,31 @@ { "packages": [ + "actionlint@latest", + "chart-testing@latest", "clusterctl@latest", + "crane@latest", + "envsubst@latest", "fluxcd@latest", "ginkgo@latest", "github-cli@latest", - "gojq@latest", "go@latest", + "gojq@latest", "golangci-lint@latest", + "golines@latest", + "google-cloud-sdk@latest", "goreleaser@latest", - "kubernetes-helm@latest", + "gotestsum@latest", + "hadolint@latest", "helm-docs@latest", "kind@latest", "kubebuilder@latest", "kubectl@latest", + "kubernetes-controller-tools@latest", + "kubernetes-helm@latest", "kustomize@latest", "pre-commit@latest", "shfmt@latest", "upx@latest", - "yamllint@latest", - "chart-testing@latest", - "google-cloud-sdk@latest", - "crane@latest", - "gotestsum@latest", - "golines@latest", - "envsubst@latest", - "kubernetes-controller-tools@latest", - "actionlint@latest", - "hadolint@latest" - ], - "shell": { - "init_hook": [ - "echo 'Welcome to devbox!' > /dev/null" - ], - "scripts": { - "test": [ - "echo \"Error: no test specified\" && exit 1" - ] - } - } + "yamllint@latest" + ] }