mirror of
https://github.com/anchore/syft.git
synced 2025-11-17 16:33:21 +01:00
Bumps [actions/cache](https://github.com/actions/cache) from 4.2.3 to 4.2.4.
- [Release notes](https://github.com/actions/cache/releases)
- [Changelog](https://github.com/actions/cache/blob/main/RELEASES.md)
- [Commits](5a3ec84eff...0400d5f644)
---
updated-dependencies:
- dependency-name: actions/cache
dependency-version: 4.2.4
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
75 lines
2.3 KiB
YAML
75 lines
2.3 KiB
YAML
name: "Bootstrap"
|
|
|
|
description: "Bootstrap all tools and dependencies"
|
|
inputs:
|
|
go-version:
|
|
description: "Go version to install"
|
|
required: true
|
|
default: ">= 1.24"
|
|
go-dependencies:
|
|
description: "Download go dependencies"
|
|
required: true
|
|
default: "true"
|
|
cache-key-prefix:
|
|
description: "Prefix all cache keys with this value"
|
|
required: true
|
|
default: "181053ac82"
|
|
download-test-fixture-cache:
|
|
description: "Download test fixture cache from OCI and github actions"
|
|
required: true
|
|
default: "false"
|
|
tools:
|
|
description: "whether to install tools"
|
|
default: "true"
|
|
bootstrap-apt-packages:
|
|
description: "Space delimited list of tools to install via apt"
|
|
default: "libxml2-utils"
|
|
|
|
runs:
|
|
using: "composite"
|
|
steps:
|
|
# note: go mod and build is automatically cached on default with v4+
|
|
- uses: actions/setup-go@d35c59abb061a4a6fb18e82ac0862c26744d6ab5 # v5.5.0
|
|
if: inputs.go-version != ''
|
|
with:
|
|
go-version: ${{ inputs.go-version }}
|
|
|
|
- name: Restore tool cache
|
|
if: inputs.tools == 'true'
|
|
id: tool-cache
|
|
uses: actions/cache@0400d5f644dc74513175e3cd8d07132dd4860809 # v4.2.4
|
|
with:
|
|
path: ${{ github.workspace }}/.tool
|
|
key: ${{ inputs.cache-key-prefix }}-${{ runner.os }}-tool-${{ hashFiles('.binny.yaml') }}
|
|
|
|
- name: Install project tools
|
|
shell: bash
|
|
if: inputs.tools == 'true'
|
|
run: make tools
|
|
|
|
- name: Install go dependencies
|
|
if: inputs.go-dependencies == 'true'
|
|
shell: bash
|
|
run: make ci-bootstrap-go
|
|
|
|
- name: Install apt packages
|
|
if: inputs.bootstrap-apt-packages != ''
|
|
shell: bash
|
|
env:
|
|
APT_PACKAGES: ${{ inputs.bootstrap-apt-packages }}
|
|
run: |
|
|
IFS=' ' read -ra packages <<< "$APT_PACKAGES"
|
|
DEBIAN_FRONTEND=noninteractive sudo apt update && sudo -E apt install -y "${packages[@]}"
|
|
|
|
- name: Restore ORAS cache from github actions
|
|
if: inputs.download-test-fixture-cache == 'true'
|
|
uses: actions/cache@0400d5f644dc74513175e3cd8d07132dd4860809 # v4.2.4
|
|
with:
|
|
path: ${{ github.workspace }}/.tmp/oras-cache
|
|
key: ${{ inputs.cache-key-prefix }}-oras-cache
|
|
|
|
- name: Download test fixture cache
|
|
if: inputs.download-test-fixture-cache == 'true'
|
|
shell: bash
|
|
run: make download-test-fixture-cache
|