Skip to content

chore(deps): bump chainguard-dev/actions/setup-kind from 1.6.25 to 1.6.26 #429

chore(deps): bump chainguard-dev/actions/setup-kind from 1.6.25 to 1.6.26

chore(deps): bump chainguard-dev/actions/setup-kind from 1.6.25 to 1.6.26 #429

Workflow file for this run

name: ci
'on':
pull_request: {}
merge_group: {}
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.event.merge_group.head_ref || github.ref }}
cancel-in-progress: true
defaults:
run:
shell: bash
permissions:
contents: read
jobs:
build:
name: Build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
with:
persist-credentials: false
- uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6.4.0
with:
go-version-file: "go.mod"
- name: Build binaries
run: |
go build -v ./...
unit-tests:
name: Unit Tests
needs: [build]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
with:
persist-credentials: false
- uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6.4.0
with:
go-version-file: "go.mod"
- name: Run unit tests
run: |
go test -v -race ./pkg/... ./cmd/...
linting:
name: Linting
needs: [build]
runs-on: ubuntu-latest
permissions:
contents: read
checks: write # Used by golangci-lint-action to annotate code in the PR
steps:
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
with:
persist-credentials: false
- uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6.4.0
with:
go-version-file: "go.mod"
- name: Check Go formatting
run: |
gofmt_out=$(gofmt -d $(find * -name '*.go' ! -path 'vendor/*' ! -path 'third_party/*'))
if [[ -n "$gofmt_out" ]]; then
echo "$gofmt_out"
echo "ERROR: Go files are not formatted. Run 'go fmt ./...' to fix."
exit 1
fi
echo "All Go files are properly formatted."
- name: golangci-lint
uses: golangci/golangci-lint-action@82606bf257cbaff209d206a39f5134f0cfbfd2ee # v9.2.1
with:
only-new-issues: true
args: --timeout=10m
- name: YAML Lint
run: |
sudo apt-get update && sudo apt-get install -y yamllint
yamllint -c .yamllint config/ .github/workflows/
continue-on-error: false
check-licenses:
name: License Check
needs: [build]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
with:
persist-credentials: false
- uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6.4.0
with:
go-version-file: "go.mod"
- name: Check licenses
run: |
go install github.com/google/go-licenses@v1.6.0
go-licenses check ./...
ko-resolve:
name: Ko Resolve (Multi-arch)
needs: [build]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
with:
persist-credentials: false
- uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6.4.0
with:
go-version-file: "go.mod"
- uses: ko-build/setup-ko@d006021bd0c28d1ce33a07e7943d48b079944c8d # v0.9
- name: Validate ko resolve for multi-arch
run: |
cat <<EOF > .ko.yaml
defaultBaseImage: ghcr.io/tektoncd/plumbing/static-base@sha256:e150c89001e336b6a0200a6bac766a7b455e5573bf91c6c37f3ef8cf2fdccf0a
EOF
# Test that ko can resolve the config for multiple architectures
KO_DOCKER_REPO=example.com ko resolve --platform=linux/amd64,linux/arm64 --push=false -R -f config 1>/dev/null
echo "Ko resolve succeeded for multi-arch build."
e2e-tests:
needs: [build]
uses: ./.github/workflows/kind-e2e.yaml
ci-summary:
name: CI summary
needs: [build, unit-tests, linting, check-licenses, ko-resolve, e2e-tests]
runs-on: ubuntu-latest
if: always()
steps:
- name: Check CI results
env:
BUILD_RESULT: ${{ needs.build.result }}
UNIT_TESTS_RESULT: ${{ needs.unit-tests.result }}
LINTING_RESULT: ${{ needs.linting.result }}
CHECK_LICENSES_RESULT: ${{ needs.check-licenses.result }}
KO_RESOLVE_RESULT: ${{ needs.ko-resolve.result }}
E2E_TESTS_RESULT: ${{ needs.e2e-tests.result }}
run: |
results=(
"build=${BUILD_RESULT}"
"unit-tests=${UNIT_TESTS_RESULT}"
"linting=${LINTING_RESULT}"
"check-licenses=${CHECK_LICENSES_RESULT}"
"ko-resolve=${KO_RESOLVE_RESULT}"
"e2e-tests=${E2E_TESTS_RESULT}"
)
failed=0
for r in "${results[@]}"; do
name="${r%%=*}"
result="${r#*=}"
echo "${name}: ${result}"
if [ "$result" != "success" ] && [ "$result" != "skipped" ]; then
failed=1
fi
done
if [ "$failed" -eq 1 ]; then
echo ""
echo "Some CI jobs failed or were cancelled"
exit 1
fi
echo ""
echo "All CI checks passed"