github.com/kastenhq/syft@v0.0.0-20230821225854-0710af25cdbe/.goreleaser.yaml (about)

     1  release:
     2    prerelease: auto
     3    draft: false
     4  
     5  env:
     6    # required to support multi architecture docker builds
     7    - DOCKER_CLI_EXPERIMENTAL=enabled
     8    - CGO_ENABLED=0
     9  
    10  builds:
    11    - id: linux-build
    12      dir: ./cmd/syft
    13      binary: syft
    14      goos:
    15        - linux
    16      goarch:
    17        - amd64
    18        - arm64
    19        - ppc64le
    20        - s390x
    21      # set the modified timestamp on the output binary to the git timestamp to ensure a reproducible build
    22      mod_timestamp: &build-timestamp '{{ .CommitTimestamp }}'
    23      ldflags: &build-ldflags |
    24        -w
    25        -s
    26        -extldflags '-static'
    27        -X github.com/anchore/syft/internal/version.version={{.Version}}
    28        -X github.com/anchore/syft/internal/version.gitCommit={{.Commit}}
    29        -X github.com/anchore/syft/internal/version.buildDate={{.Date}}
    30        -X github.com/anchore/syft/internal/version.gitDescription={{.Summary}}
    31  
    32    - id: darwin-build
    33      dir: ./cmd/syft
    34      binary: syft
    35      goos:
    36        - darwin
    37      goarch:
    38        - amd64
    39        - arm64
    40      mod_timestamp: *build-timestamp
    41      ldflags: *build-ldflags
    42      hooks:
    43        post:
    44          - cmd: .tmp/quill sign-and-notarize "{{ .Path }}" --dry-run={{ .IsSnapshot }} --ad-hoc={{ .IsSnapshot }} -vv
    45            env:
    46              - QUILL_LOG_FILE=/tmp/quill-{{ .Target }}.log
    47  
    48    - id: windows-build
    49      dir: ./cmd/syft
    50      binary: syft
    51      goos:
    52        - windows
    53      goarch:
    54        - amd64
    55      mod_timestamp: *build-timestamp
    56      ldflags: *build-ldflags
    57  
    58  archives:
    59    - id: linux-archives
    60      builds:
    61        - linux-build
    62  
    63    # note: the signing process is depending on tar.gz archives. If this format changes then .github/scripts/apple-signing/*.sh will need to be adjusted
    64    - id: darwin-archives
    65      builds:
    66        - darwin-build
    67  
    68    - id: windows-archives
    69      format: zip
    70      builds:
    71        - windows-build
    72  
    73  nfpms:
    74    - license: "Apache 2.0"
    75      maintainer: "Anchore, Inc"
    76      homepage: &website "https://github.com/anchore/syft"
    77      description: &description "A tool that generates a Software Bill Of Materials (SBOM) from container images and filesystems"
    78      formats:
    79        - rpm
    80        - deb
    81  
    82  brews:
    83    - tap:
    84        owner: anchore
    85        name: homebrew-syft
    86        token: "{{.Env.GITHUB_BREW_TOKEN}}"
    87      ids:
    88        - darwin-archives
    89        - linux-archives
    90      homepage: *website
    91      description: *description
    92      license: "Apache License 2.0"
    93  
    94  dockers:
    95    - image_templates:
    96        - anchore/syft:debug
    97        - anchore/syft:{{.Tag}}-debug
    98        - ghcr.io/anchore/syft:debug
    99        - ghcr.io/anchore/syft:{{.Tag}}-debug
   100      goarch: amd64
   101      dockerfile: Dockerfile.debug
   102      use: buildx
   103      build_flag_templates:
   104        - "--platform=linux/amd64"
   105        - "--build-arg=BUILD_DATE={{.Date}}"
   106        - "--build-arg=BUILD_VERSION={{.Version}}"
   107        - "--build-arg=VCS_REF={{.FullCommit}}"
   108        - "--build-arg=VCS_URL={{.GitURL}}"
   109  
   110    - image_templates:
   111        - anchore/syft:debug-arm64v8
   112        - anchore/syft:{{.Tag}}-debug-arm64v8
   113        - ghcr.io/anchore/syft:debug-arm64v8
   114        - ghcr.io/anchore/syft:{{.Tag}}-debug-arm64v8
   115      goarch: arm64
   116      dockerfile: Dockerfile.debug
   117      use: buildx
   118      build_flag_templates:
   119        - "--platform=linux/arm64/v8"
   120        - "--build-arg=BUILD_DATE={{.Date}}"
   121        - "--build-arg=BUILD_VERSION={{.Version}}"
   122        - "--build-arg=VCS_REF={{.FullCommit}}"
   123        - "--build-arg=VCS_URL={{.GitURL}}"
   124  
   125    - image_templates:
   126        - anchore/syft:debug-ppc64le
   127        - anchore/syft:{{.Tag}}-debug-ppc64le
   128        - ghcr.io/anchore/syft:debug-ppc64le
   129        - ghcr.io/anchore/syft:{{.Tag}}-debug-ppc64le
   130      goarch: ppc64le
   131      dockerfile: Dockerfile.debug
   132      use: buildx
   133      build_flag_templates:
   134        - "--platform=linux/ppc64le"
   135        - "--build-arg=BUILD_DATE={{.Date}}"
   136        - "--build-arg=BUILD_VERSION={{.Version}}"
   137        - "--build-arg=VCS_REF={{.FullCommit}}"
   138        - "--build-arg=VCS_URL={{.GitURL}}"
   139  
   140    - image_templates:
   141        - anchore/syft:debug-s390x
   142        - anchore/syft:{{.Tag}}-debug-s390x
   143        - ghcr.io/anchore/syft:debug-s390x
   144        - ghcr.io/anchore/syft:{{.Tag}}-debug-s390x
   145      goarch: s390x
   146      dockerfile: Dockerfile.debug
   147      use: buildx
   148      build_flag_templates:
   149        - "--platform=linux/s390x"
   150        - "--build-arg=BUILD_DATE={{.Date}}"
   151        - "--build-arg=BUILD_VERSION={{.Version}}"
   152        - "--build-arg=VCS_REF={{.FullCommit}}"
   153        - "--build-arg=VCS_URL={{.GitURL}}"
   154  
   155    - image_templates:
   156        - anchore/syft:latest
   157        - anchore/syft:{{.Tag}}
   158        - ghcr.io/anchore/syft:latest
   159        - ghcr.io/anchore/syft:{{.Tag}}
   160      goarch: amd64
   161      dockerfile: Dockerfile
   162      use: buildx
   163      build_flag_templates:
   164        - "--platform=linux/amd64"
   165        - "--build-arg=BUILD_DATE={{.Date}}"
   166        - "--build-arg=BUILD_VERSION={{.Version}}"
   167        - "--build-arg=VCS_REF={{.FullCommit}}"
   168        - "--build-arg=VCS_URL={{.GitURL}}"
   169  
   170    - image_templates:
   171        - anchore/syft:{{.Tag}}-arm64v8
   172        - ghcr.io/anchore/syft:{{.Tag}}-arm64v8
   173      goarch: arm64
   174      dockerfile: Dockerfile
   175      use: buildx
   176      build_flag_templates:
   177        - "--platform=linux/arm64/v8"
   178        - "--build-arg=BUILD_DATE={{.Date}}"
   179        - "--build-arg=BUILD_VERSION={{.Version}}"
   180        - "--build-arg=VCS_REF={{.FullCommit}}"
   181        - "--build-arg=VCS_URL={{.GitURL}}"
   182  
   183    - image_templates:
   184        - anchore/syft:{{.Tag}}-ppc64le
   185        - ghcr.io/anchore/syft:{{.Tag}}-ppc64le
   186      goarch: ppc64le
   187      dockerfile: Dockerfile
   188      use: buildx
   189      build_flag_templates:
   190        - "--platform=linux/ppc64le"
   191        - "--build-arg=BUILD_DATE={{.Date}}"
   192        - "--build-arg=BUILD_VERSION={{.Version}}"
   193        - "--build-arg=VCS_REF={{.FullCommit}}"
   194        - "--build-arg=VCS_URL={{.GitURL}}"
   195  
   196    - image_templates:
   197        - anchore/syft:{{.Tag}}-s390x
   198        - ghcr.io/anchore/syft:{{.Tag}}-s390x
   199      goarch: s390x
   200      dockerfile: Dockerfile
   201      use: buildx
   202      build_flag_templates:
   203        - "--platform=linux/s390x"
   204        - "--build-arg=BUILD_DATE={{.Date}}"
   205        - "--build-arg=BUILD_VERSION={{.Version}}"
   206        - "--build-arg=VCS_REF={{.FullCommit}}"
   207        - "--build-arg=VCS_URL={{.GitURL}}"
   208  
   209  docker_manifests:
   210    - name_template: anchore/syft:latest
   211      image_templates:
   212        - anchore/syft:{{.Tag}}
   213        - anchore/syft:{{.Tag}}-arm64v8
   214        - anchore/syft:{{.Tag}}-ppc64le
   215        - anchore/syft:{{.Tag}}-s390x
   216  
   217    - name_template: anchore/syft:debug
   218        - anchore/syft:{{.Tag}}-debug
   219        - anchore/syft:{{.Tag}}-debug-arm64v8
   220        - anchore/syft:{{.Tag}}-debug-ppc64le
   221        - anchore/syft:{{.Tag}}-debug-s390x
   222  
   223    - name_template: anchore/syft:{{.Tag}}
   224      image_templates:
   225        - anchore/syft:{{.Tag}}
   226        - anchore/syft:{{.Tag}}-arm64v8
   227        - anchore/syft:{{.Tag}}-ppc64le
   228        - anchore/syft:{{.Tag}}-s390x
   229  
   230    - name_template: ghcr.io/anchore/syft:latest
   231      image_templates:
   232        - ghcr.io/anchore/syft:{{.Tag}}
   233        - ghcr.io/anchore/syft:{{.Tag}}-arm64v8
   234        - ghcr.io/anchore/syft:{{.Tag}}-ppc64le
   235        - ghcr.io/anchore/syft:{{.Tag}}-s390x
   236  
   237    - name_template: ghcr.io/anchore/syft:debug
   238      image_templates:
   239        - ghcr.io/anchore/syft:{{.Tag}}-debug
   240        - ghcr.io/anchore/syft:{{.Tag}}-debug-arm64v8
   241        - ghcr.io/anchore/syft:{{.Tag}}-debug-ppc64le
   242        - ghcr.io/anchore/syft:{{.Tag}}-debug-s390x
   243  
   244    - name_template: ghcr.io/anchore/syft:{{.Tag}}
   245      image_templates:
   246        - ghcr.io/anchore/syft:{{.Tag}}
   247        - ghcr.io/anchore/syft:{{.Tag}}-arm64v8
   248        - ghcr.io/anchore/syft:{{.Tag}}-ppc64le
   249        - ghcr.io/anchore/syft:{{.Tag}}-s390x