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@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # 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@2b82ce82d56a2a04d2637cd93a637ae1b359c0a7 # v2 - uses: docker/setup-buildx-action@6a58db7e0d21ca03e6c44877909e80e45217eed2 # 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: cachix/install-nix-action@v21 with: github_access_token: ${{ secrets.GITHUB_TOKEN }} - uses: actions/setup-go@fac708d6674e30b6ba41289acaab6d4b75aa0753 # v4 with: go-version: stable - uses: sigstore/cosign-installer@v3.0.5 - 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@eaaf4bedf32dbdc6b720b63067d99c4d77d6047d # v3 with: file: ./coverage.txt - run: ./goreleaser check - run: git diff