mirror of
https://github.com/anchore/syft.git
synced 2025-11-17 16:33:21 +01:00
upgrade goreleaser + constrain pipeline tool cache
Signed-off-by: Alex Goodman <alex.goodman@anchore.com>
This commit is contained in:
parent
46636ccb3c
commit
e3b1522394
29
.github/workflows/release.yaml
vendored
29
.github/workflows/release.yaml
vendored
@ -103,23 +103,32 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
|
|
||||||
# We are expecting this cache to have been created during the "Build-Snapshot-Artifacts" job in the "Acceptance" workflow.
|
- name: Restore tool cache
|
||||||
- name: Restore bootstrap cache
|
id: tool-cache
|
||||||
id: cache
|
|
||||||
uses: actions/cache@v2.1.3
|
uses: actions/cache@v2.1.3
|
||||||
with:
|
with:
|
||||||
path: |
|
path: ${{ github.workspace }}/.tmp
|
||||||
~/go/pkg/mod
|
key: ${{ runner.os }}-tool-${{ hashFiles('Makefile') }}
|
||||||
${{ github.workspace }}/.tmp
|
|
||||||
key: ${{ runner.os }}-go-${{ env.GO_VERSION }}-${{ hashFiles('**/go.sum') }}-${{ hashFiles('Makefile') }}
|
- name: Restore go cache
|
||||||
|
id: go-cache
|
||||||
|
uses: actions/cache@v2.1.3
|
||||||
|
with:
|
||||||
|
path: ~/go/pkg/mod
|
||||||
|
key: ${{ runner.os }}-go-${{ env.GO_VERSION }}-${{ hashFiles('**/go.sum') }}
|
||||||
restore-keys: |
|
restore-keys: |
|
||||||
${{ runner.os }}-go-${{ env.GO_VERSION }}-${{ hashFiles('**/go.sum') }}-
|
|
||||||
${{ runner.os }}-go-${{ env.GO_VERSION }}-
|
${{ runner.os }}-go-${{ env.GO_VERSION }}-
|
||||||
|
|
||||||
- name: Bootstrap project dependencies
|
- name: (cache-miss) Bootstrap all project dependencies
|
||||||
if: steps.bootstrap-cache.outputs.cache-hit != 'true'
|
if: steps.tool-cache.outputs.cache-hit != 'true' || steps.go-cache.outputs.cache-hit != 'true'
|
||||||
run: make bootstrap
|
run: make bootstrap
|
||||||
|
|
||||||
|
- name: Login to Docker Hub
|
||||||
|
uses: docker/login-action@v1
|
||||||
|
with:
|
||||||
|
username: ${{ secrets.TOOLBOX_DOCKER_USER }}
|
||||||
|
password: ${{ secrets.TOOLBOX_DOCKER_PASS }}
|
||||||
|
|
||||||
- name: Import GPG key
|
- name: Import GPG key
|
||||||
id: import_gpg
|
id: import_gpg
|
||||||
uses: crazy-max/ghaction-import-gpg@v2
|
uses: crazy-max/ghaction-import-gpg@v2
|
||||||
|
|||||||
@ -92,18 +92,15 @@ brews:
|
|||||||
description: *description
|
description: *description
|
||||||
|
|
||||||
dockers:
|
dockers:
|
||||||
-
|
- dockerfile: Dockerfile
|
||||||
binaries:
|
|
||||||
- syft
|
|
||||||
dockerfile: Dockerfile
|
|
||||||
image_templates:
|
image_templates:
|
||||||
- "anchore/syft:latest"
|
- "anchore/syft:latest"
|
||||||
- "anchore/syft:{{ .Tag }}"
|
- "anchore/syft:{{ .Tag }}"
|
||||||
- "anchore/syft:v{{ .Major }}"
|
- "anchore/syft:v{{ .Major }}"
|
||||||
- "anchore/syft:v{{ .Major }}.{{ .Minor }}"
|
- "anchore/syft:v{{ .Major }}.{{ .Minor }}"
|
||||||
|
|
||||||
build_flag_templates:
|
build_flag_templates:
|
||||||
- "--build-arg=BUILD_DATE={{.Date}}"
|
- "--build-arg=BUILD_DATE={{.Date}}"
|
||||||
- "--build-arg=BUILD_VERSION={{.Version}}"
|
- "--build-arg=BUILD_VERSION={{.Version}}"
|
||||||
- "--build-arg=VCS_REF={{.FullCommit}}"
|
- "--build-arg=VCS_REF={{.FullCommit}}"
|
||||||
- "--build-arg=VCS_URL={{.GitURL}}"
|
- "--build-arg=VCS_URL={{.GitURL}}"
|
||||||
|
use_buildx: true
|
||||||
|
|||||||
10
Makefile
10
Makefile
@ -19,7 +19,7 @@ COVERAGE_THRESHOLD := 68
|
|||||||
# CI cache busting values; change these if you want CI to not use previous stored cache
|
# CI cache busting values; change these if you want CI to not use previous stored cache
|
||||||
INTEGRATION_CACHE_BUSTER="23493ba738c3d2f"
|
INTEGRATION_CACHE_BUSTER="23493ba738c3d2f"
|
||||||
CLI_CACHE_BUSTER="789bacdf"
|
CLI_CACHE_BUSTER="789bacdf"
|
||||||
BOOTSTRAP_CACHE="789bacdf"
|
BOOTSTRAP_CACHE="c7afb99ad"
|
||||||
|
|
||||||
## Build variables
|
## Build variables
|
||||||
DISTDIR=./dist
|
DISTDIR=./dist
|
||||||
@ -100,10 +100,10 @@ $(TEMPDIR):
|
|||||||
|
|
||||||
.PHONY: bootstrap-tools
|
.PHONY: bootstrap-tools
|
||||||
bootstrap-tools: $(TEMPDIR)
|
bootstrap-tools: $(TEMPDIR)
|
||||||
[ -f "$(TEMPDIR)/benchstat" ] || GO111MODULE=off GOBIN=$(shell realpath $(TEMPDIR)) go get -u golang.org/x/perf/cmd/benchstat
|
GO111MODULE=off GOBIN=$(shell realpath $(TEMPDIR)) go get -u golang.org/x/perf/cmd/benchstat
|
||||||
[ -f "$(TEMPDIR)/golangci" ] || curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(TEMPDIR)/ v1.26.0
|
curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(TEMPDIR)/ v1.26.0
|
||||||
[ -f "$(TEMPDIR)/bouncer" ] || curl -sSfL https://raw.githubusercontent.com/wagoodman/go-bouncer/master/bouncer.sh | sh -s -- -b $(TEMPDIR)/ v0.2.0
|
curl -sSfL https://raw.githubusercontent.com/wagoodman/go-bouncer/master/bouncer.sh | sh -s -- -b $(TEMPDIR)/ v0.2.0
|
||||||
[ -f "$(TEMPDIR)/goreleaser" ] || curl -sfL https://install.goreleaser.com/github.com/goreleaser/goreleaser.sh | sh -s -- -b $(TEMPDIR)/ v0.140.0
|
curl -sfL https://install.goreleaser.com/github.com/goreleaser/goreleaser.sh | sh -s -- -b $(TEMPDIR)/ v0.160.0
|
||||||
|
|
||||||
.PHONY: bootstrap-go
|
.PHONY: bootstrap-go
|
||||||
bootstrap-go:
|
bootstrap-go:
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user