Skip to content

Commit

Permalink
Correcting behavior based on Syft release v0.91.0 run (anchore#2162)
Browse files Browse the repository at this point in the history
* dont show the title in the release notes

Signed-off-by: Alex Goodman <[email protected]>

* dont upload assets on the release pipeline

Signed-off-by: Alex Goodman <[email protected]>

* bump action-slack action to v3.15.1

Signed-off-by: Alex Goodman <[email protected]>

* remove custom go mod and build cache

Signed-off-by: Alex Goodman <[email protected]>

---------

Signed-off-by: Alex Goodman <[email protected]>
  • Loading branch information
wagoodman authored Sep 20, 2023
1 parent 6ec9336 commit 188701e
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 37 deletions.
1 change: 1 addition & 0 deletions .chronicle.yaml
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
enforce-v0: true # don't make breaking-change label bump major version before 1.0.
title: ""
32 changes: 2 additions & 30 deletions .github/actions/bootstrap/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,6 @@ inputs:
description: "Go version to install"
required: true
default: "1.21.x"
use-go-cache:
description: "Restore go cache"
required: true
default: "true"
cache-key-prefix:
description: "Prefix all cache keys with this value"
required: true
Expand All @@ -25,6 +21,7 @@ inputs:
runs:
using: "composite"
steps:
# note: go mod and build is automatically cached on default with v4+
- uses: actions/setup-go@93397bea11091df50f3d7e59dc26a7711a8bcfbe #v4.1.0
with:
go-version: ${{ inputs.go-version }}
Expand All @@ -36,38 +33,13 @@ runs:
path: ${{ github.workspace }}/.tmp
key: ${{ inputs.cache-key-prefix }}-${{ runner.os }}-tool-${{ hashFiles('Makefile') }}

# note: we need to keep restoring the go mod cache before bootstrapping tools since `go install` is used in
# some installations of project tools.
- name: Restore go module cache
id: go-mod-cache
if: inputs.use-go-cache == 'true'
uses: actions/cache@704facf57e6136b1bc63b828d79edcd491f0ee84 #v3.3.2
with:
path: |
~/go/pkg/mod
key: ${{ inputs.cache-key-prefix }}-${{ runner.os }}-go-mod-${{ inputs.go-version }}-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ inputs.cache-key-prefix }}-${{ runner.os }}-go-mod-${{ inputs.go-version }}-
- name: (cache-miss) Bootstrap project tools
shell: bash
if: steps.tool-cache.outputs.cache-hit != 'true'
run: make bootstrap-tools

- name: Restore go build cache
id: go-cache
if: inputs.use-go-cache == 'true'
uses: actions/cache@704facf57e6136b1bc63b828d79edcd491f0ee84 #v3.3.2
with:
path: |
~/.cache/go-build
key: ${{ inputs.cache-key-prefix }}-${{ inputs.build-cache-key-prefix }}-${{ runner.os }}-go-build-${{ inputs.go-version }}-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ inputs.cache-key-prefix }}-${{ inputs.build-cache-key-prefix }}-${{ runner.os }}-go-build-${{ inputs.go-version }}-
- name: (cache-miss) Bootstrap go dependencies
- name: Bootstrap go dependencies
shell: bash
if: steps.go-mod-cache.outputs.cache-hit != 'true' && inputs.use-go-cache == 'true'
run: make bootstrap-go

- name: Install apt packages
Expand Down
8 changes: 1 addition & 7 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ jobs:
with:
artifact-name: sbom.spdx.json

- uses: 8398a7/action-slack@49aa08e51e8782f49c601d79ec72d07fd39a4612 #v3.15.1
- uses: 8398a7/action-slack@fbd6aa58ba854a740e11a35d0df80cb5d12101d8 #v3.15.1
continue-on-error: true
with:
status: ${{ job.status }}
Expand All @@ -158,9 +158,3 @@ jobs:
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_TOOLBOX_WEBHOOK_URL }}
if: ${{ success() }}

- uses: actions/upload-artifact@a8a3f3ad30e3422c9c7b888a15615d19a852ae32 #v3.1.3
with:
name: artifacts
path: dist/**/*

0 comments on commit 188701e

Please sign in to comment.