name: build on: push: branches: - 'main' pull_request: paths: - 'go.*' - '**/*.go' - 'Taskfile.yml' - 'Dockerfile' - '.github/workflows/*.yml' permissions: contents: read jobs: govulncheck: uses: caarlos0/meta/.github/workflows/govulncheck.yml@main semgrep: uses: caarlos0/meta/.github/workflows/semgrep.yml@main ruleguard: uses: caarlos0/meta/.github/workflows/ruleguard.yml@main with: args: '-disable largeloopcopy' test: runs-on: ubuntu-latest env: DOCKER_CLI_EXPERIMENTAL: "enabled" steps: - uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3 with: fetch-depth: 0 - uses: arduino/setup-task@e26d8975574116b0097a1161e0fe16ba75d84c1c # v1 with: version: 3.x repo-token: ${{ secrets.GITHUB_TOKEN }} - uses: docker/setup-qemu-action@e81a89b1732b9c48d79cd809d8d81d79c4647a18 # v2 - uses: docker/setup-buildx-action@4b4e9c3e2d4531116a6f8ba8e71fc6e2cb6e6c8c # v2 - name: setup-snapcraft # FIXME: the mkdirs are a hack for https://github.com/goreleaser/goreleaser/issues/1715 run: | sudo apt-get update sudo apt-get -yq --no-install-suggests --no-install-recommends install snapcraft mkdir -p $HOME/.cache/snapcraft/download mkdir -p $HOME/.cache/snapcraft/stage-packages - uses: crazy-max/ghaction-upx@v2 with: install-only: true - uses: actions/setup-go@fac708d6674e30b6ba41289acaab6d4b75aa0753 # v4 with: go-version: stable - uses: sigstore/cosign-installer@v3.0.3 - uses: anchore/sbom-action/download-syft@v0.14.2 - name: setup-validate-krew-manifest run: go install sigs.k8s.io/krew/cmd/validate-krew-manifest@latest - name: setup-tparse run: go install github.com/mfridman/tparse@latest - name: setup run: | task setup task build - name: test run: ./scripts/test.sh - uses: codecov/codecov-action@894ff025c7b54547a9a2a1e9f228beae737ad3c2 # v3 with: file: ./coverage.txt - run: ./goreleaser check - run: git diff