github.com/goreleaser/goreleaser@v1.25.1/.github/workflows/build.yml (about) 1 name: build 2 3 on: 4 push: 5 branches: 6 - "main" 7 pull_request: 8 paths: 9 - "go.*" 10 - "**/*.go" 11 - "Taskfile.yml" 12 - "Dockerfile" 13 - ".github/workflows/*.yml" 14 15 permissions: 16 contents: read 17 18 jobs: 19 govulncheck: 20 uses: caarlos0/meta/.github/workflows/govulncheck.yml@main 21 semgrep: 22 uses: caarlos0/meta/.github/workflows/semgrep.yml@main 23 ruleguard: 24 uses: caarlos0/meta/.github/workflows/ruleguard.yml@main 25 with: 26 args: "-disable largeloopcopy" 27 test: 28 runs-on: ubuntu-latest 29 env: 30 DOCKER_CLI_EXPERIMENTAL: "enabled" 31 steps: 32 - uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v3 33 with: 34 fetch-depth: 0 35 - uses: arduino/setup-task@b91d5d2c96a56797b48ac1e0e89220bf64044611 # v1 36 with: 37 version: 3.x 38 repo-token: ${{ secrets.GITHUB_TOKEN }} 39 - uses: docker/setup-qemu-action@68827325e0b33c7199eb31dd4e31fbe9023e06e3 # v2 40 - uses: docker/setup-buildx-action@2b51285047da1547ffb1b2203d8be4c0af6b1f20 # v3 41 - name: setup-snapcraft 42 # FIXME: the mkdirs are a hack for https://github.com/goreleaser/goreleaser/issues/1715 43 run: | 44 sudo apt-get update 45 sudo apt-get -yq --no-install-suggests --no-install-recommends install snapcraft 46 mkdir -p $HOME/.cache/snapcraft/download 47 mkdir -p $HOME/.cache/snapcraft/stage-packages 48 - uses: crazy-max/ghaction-upx@v3 49 with: 50 install-only: true 51 - uses: cachix/install-nix-action@v26 52 with: 53 github_access_token: ${{ secrets.GITHUB_TOKEN }} 54 - uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491 # v4 55 with: 56 go-version: stable 57 - uses: sigstore/cosign-installer@v3.4.0 58 - uses: anchore/sbom-action/download-syft@v0.15.10 59 - name: setup-validate-krew-manifest 60 run: go install sigs.k8s.io/krew/cmd/validate-krew-manifest@latest 61 - name: setup 62 run: | 63 task setup 64 task build 65 - name: test 66 run: task test 67 - uses: codecov/codecov-action@c16abc29c95fcf9174b58eb7e1abf4c866893bc8 # v4 68 with: 69 file: ./coverage.txt 70 - run: ./goreleaser check 71 - run: git diff