build(deps): Bump the all-go-mod-patch-and-minor group across 2 directories with 1 update #249
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Copyright 2024 Nutanix. All rights reserved. | |
# SPDX-License-Identifier: Apache-2.0 | |
name: Black Duck Policy Check | |
on: | |
pull_request: | |
branches: | |
- main | |
# Only scan when product source dependencies change. | |
paths: | |
- '**/go.mod' | |
# Ignore source dependencies of build tooling. | |
- '!docs/go.mod' | |
push: | |
branches: | |
- main | |
# Only scan when product source dependencies change. | |
paths: | |
- '**/go.mod' | |
# Ignore source dependencies of build tooling. | |
- '!docs/go.mod' | |
jobs: | |
security: | |
if: github.repository == 'nutanix-cloud-native/cluster-api-runtime-extensions-nutanix' | |
runs-on: ubuntu-24.04 | |
permissions: | |
pull-requests: write | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v5 | |
- name: Install devbox | |
uses: jetify-com/devbox-install-action@v0.14.0 | |
with: | |
enable-cache: true | |
- name: Export go version and mod cache path | |
id: export-go-version-and-mod-cache-path | |
run: | | |
echo go-version="$(devbox run -- go version | cut -d ' ' -f 3)" >>"${GITHUB_OUTPUT}" | |
echo mod-cache-path="$(devbox run -- go env GOMODCACHE)" >>"${GITHUB_OUTPUT}" | |
- name: Go cache | |
uses: actions/cache@v4 | |
with: | |
path: | | |
${{ steps.export-go-version-and-mod-cache-path.outputs.mod-cache-path }} | |
key: ${{ runner.os }}-${{ steps.export-go-version-and-mod-cache-path.outputs.go-version }}-${{ hashFiles('**/go.sum') }} | |
restore-keys: | | |
${{ runner.os }}-${{ steps.export-go-version-and-mod-cache-path.outputs.go-version }}- | |
- name: Build Project | |
run: devbox run -- make build-snapshot | |
- name: Set up Java 11 | |
uses: actions/setup-java@v5 | |
with: | |
java-version: "11" | |
distribution: "adopt" | |
- name: Setup go | |
uses: actions/setup-go@v6 | |
with: | |
go-version-file: go.mod | |
- name: Black Duck Full Scan | |
if: ${{ github.event_name != 'pull_request' }} | |
uses: blackduck-inc/black-duck-security-scan@v2.5.0 | |
with: | |
blackducksca_url: ${{ secrets.BLACKDUCK_URL }} | |
blackducksca_token: ${{ secrets.BLACKDUCK_API_TOKEN }} | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
blackducksca_scan_full: true | |
blackducksca_scan_failure_severities: 'BLOCKER,CRITICAL' | |
- name: Black Duck PR Scan | |
if: ${{ github.event_name == 'pull_request' }} | |
uses: blackduck-inc/black-duck-security-scan@v2.5.0 | |
env: | |
DETECT_PROJECT_VERSION_NAME: ${{ github.base_ref }} | |
with: | |
blackducksca_url: ${{ secrets.BLACKDUCK_URL }} | |
blackducksca_token: ${{ secrets.BLACKDUCK_API_TOKEN }} | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
blackducksca_scan_full: false | |
blackducksca_prComment_enabled: true |