Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: exchange versions with pinned commits #598

Merged
merged 5 commits into from
Feb 19, 2025
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
80 changes: 80 additions & 0 deletions .github/workflows/blackduck_scan.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
name: Blackduck SCA Scan
on:
#push:
# branches: [ "main" ]
#pull_request:
# branches: [ "main" ]
schedule:
- cron: '8 0 * * 0'
workflow_dispatch:

permissions:
contents: read
checks: write

jobs:
build:
runs-on: [ ubuntu-latest ]
steps:
- name: Checkout code
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683

- name: Setup Go
uses: actions/setup-go@f111f3307d8850f501ac008e886eec1fd1932a34
with:
go-version-file: '${{ github.workspace }}/go.mod'
cache: false

- name: Get go environment for use with cache
run: |
echo "go_cache=$(go env GOCACHE)" >> $GITHUB_ENV
echo "go_modcache=$(go env GOMODCACHE)" >> $GITHUB_ENV
# This step will only reuse the go mod and build cache from main made during the Build,
# see push_ocm.yaml => "ocm-cli-latest" Job
# This means it never caches by itself and PRs cannot cause cache pollution / thrashing
# This is because we have huge storage requirements for our cache because of the mass of dependencies

- name: Restore / Reuse Cache from central build
id: cache-golang-restore
uses: actions/cache/restore@0c907a75c2c80ebcb7f088228285e798b750cf8f # Only Restore, not build another cache (too big)
with:
path: |
${{ env.go_cache }}
${{ env.go_modcache }}
key: ${{ env.cache_name }}-${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}-${{ hashFiles('**/go.mod') }}
restore-keys: |
${{ env.cache_name }}-${{ runner.os }}-go-
env:
cache_name: ocm-cli-latest-go-cache # needs to be the same key in the end as in the build step

- name: Run Black Duck Full SCA Scan (Manual Trigger and Scheduled)
if: github.event_name == 'workflow_dispatch' || github.event_name == 'schedule'
uses: blackduck-inc/black-duck-security-scan@805cbd09e806b01907bbea0f990723c2bb85abe9
env:
DETECT_PROJECT_USER_GROUPS: opencomponentmodel
DETECT_PROJECT_VERSION_DISTRIBUTION: opensource
DETECT_SOURCE_PATH: ./
DETECT_EXCLUDED_DIRECTORIES: .bridge
DETECT_BLACKDUCK_SIGNATURE_SCANNER_ARGUMENTS: '--min-scan-interval=0'
NODE_TLS_REJECT_UNAUTHORIZED: true
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
blackducksca_url: ${{ secrets.BLACKDUCK_URL }}
blackducksca_token: ${{ secrets.BLACKDUCK_API_TOKEN }}
blackducksca_scan_full: true

- name: Run Black Duck SCA Scan (Pull Request or Push)
if: github.event_name != 'workflow_dispatch'
# The action sets blackducksca_scan_full internally: for pushes to true and PRs to false
uses: blackduck-inc/black-duck-security-scan@v2.0.0
env:
DETECT_PROJECT_USER_GROUPS: opencomponentmodel
DETECT_PROJECT_VERSION_DISTRIBUTION: opensource
DETECT_SOURCE_PATH: ./
DETECT_EXCLUDED_DIRECTORIES: .bridge
NODE_TLS_REJECT_UNAUTHORIZED: true
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
blackducksca_url: ${{ secrets.BLACKDUCK_URL }}
blackducksca_token: ${{ secrets.BLACKDUCK_API_TOKEN }}
blackducksca_prComment_enabled: true
34 changes: 0 additions & 34 deletions .github/workflows/blackduck_scan_scheduled.yaml

This file was deleted.

6 changes: 3 additions & 3 deletions .github/workflows/check-manifest-generation-diff.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,18 +9,18 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
with:
fetch-depth: 0
- name: Make manifests && generate
run: |
make manifests && make generate
- name: Setup Go
uses: actions/setup-go@v5
uses: actions/setup-go@f111f3307d8850f501ac008e886eec1fd1932a34
with:
go-version-file: '${{ github.workspace }}/go.mod'
- name: Restore Go cache
uses: actions/cache@v4
uses: actions/cache@0c907a75c2c80ebcb7f088228285e798b750cf8f
with:
path: /home/runner/work/_temp/_github_home/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main ]
branches: [ "main" ]
schedule:
- cron: '38 7 * * 4'

Expand Down Expand Up @@ -57,7 +57,7 @@ jobs:
# your codebase is analyzed, see https://docs.github.com/en/code-security/code-scanning/creating-an-advanced-setup-for-code-scanning/codeql-code-scanning-for-compiled-languages
steps:
- name: Checkout repository
uses: actions/checkout@v4
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683

# Add any setup steps before running the `github/codeql-action/init` action.
# This includes steps like installing compilers or runtimes (`actions/setup-node`
Expand All @@ -67,7 +67,7 @@ jobs:

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v3
uses: github/codeql-action/init@9e8d0789d4a0fa9ceb6b1738f7e269594bdd67f0
with:
languages: ${{ matrix.language }}
build-mode: ${{ matrix.build-mode }}
Expand All @@ -80,6 +80,6 @@ jobs:
# queries: security-extended,security-and-quality

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v3
uses: github/codeql-action/analyze@9e8d0789d4a0fa9ceb6b1738f7e269594bdd67f0
with:
category: "/language:${{matrix.language}}"
6 changes: 3 additions & 3 deletions .github/workflows/components.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,12 @@ jobs:
runs-on: large_runner
steps:
- name: Checkout
uses: actions/checkout@v4
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
with:
ref: ${{ github.event.pull_request.head.sha }}
fetch-depth: 0
- name: Cache go-build and mod
uses: actions/cache@v4
uses: actions/cache@0c907a75c2c80ebcb7f088228285e798b750cf8f
with:
path: |
~/.cache/go-build/
Expand All @@ -32,7 +32,7 @@ jobs:
restore-keys: |
go-
- name: Setup Go
uses: actions/setup-go@v5
uses: actions/setup-go@f111f3307d8850f501ac008e886eec1fd1932a34
with:
go-version-file: '${{ github.workspace }}/go.mod'
- name: CTF
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/e2e.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,13 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
- name: Setup Go
uses: actions/setup-go@v5
uses: actions/setup-go@f111f3307d8850f501ac008e886eec1fd1932a34
with:
go-version-file: '${{ github.workspace }}/go.mod'
- name: Restore Go cache
uses: actions/cache@v4
uses: actions/cache@0c907a75c2c80ebcb7f088228285e798b750cf8f
with:
path: /home/runner/work/_temp/_github_home/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
Expand Down
12 changes: 6 additions & 6 deletions .github/workflows/mend_scan.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,21 +28,21 @@ jobs:

steps:
- name: Checkout Code
uses: actions/checkout@v4
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683

- name: Set up Java 17
uses: actions/setup-java@v4
uses: actions/setup-java@3a4f6e1af504cf6a31855fa899c6aa5355ba6c12
with:
java-version: '17'
distribution: 'temurin'

- name: Setup Go
uses: actions/setup-go@v5
uses: actions/setup-go@f111f3307d8850f501ac008e886eec1fd1932a34
with:
go-version-file: '${{ github.workspace }}/go.mod'

- name: 'Setup jq'
uses: dcarbone/install-jq-action@v3.0.1
uses: dcarbone/install-jq-action@e397bd87438d72198f81efd21f876461183d383a
with:
version: '1.7'

Expand Down Expand Up @@ -171,14 +171,14 @@ jobs:
echo "status=white_check_mark" >> $GITHUB_OUTPUT
fi
- name: Check if PR exists
uses: 8BitJonny/gh-get-current-pr@3.0.0
uses: 8BitJonny/gh-get-current-pr@08e737c57a3a4eb24cec6487664b243b77eb5e36
id: pr_exists
with:
filterOutClosed: true
sha: ${{ github.event.pull_request.head.sha }}
- name: Comment Mend Status on PR
if: ${{ github.event_name != 'schedule' && steps.pr_exists.outputs.pr_found == 'true' }}
uses: thollander/actions-comment-pull-request@v3.0.1
uses: thollander/actions-comment-pull-request@24bffb9b452ba05a4f3f77933840a6a841d1b32b
with:
message: |
## Mend Scan Summary: :${{ steps.report.outputs.status }}:
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,15 +31,15 @@ jobs:
packages: 'write'
steps:
- name: Checkout
uses: actions/checkout@v4
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
with:
fetch-depth: 0
- name: Setup Go
uses: actions/setup-go@v5
uses: actions/setup-go@f111f3307d8850f501ac008e886eec1fd1932a34
with:
go-version-file: '${{ github.workspace }}/go.mod'
- name: Cache go-build and mod
uses: actions/cache@v4
uses: actions/cache@0c907a75c2c80ebcb7f088228285e798b750cf8f
with:
path: |
~/.cache/go-build/
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,16 +20,16 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
- name: Setup Go
uses: actions/setup-go@v5
uses: actions/setup-go@f111f3307d8850f501ac008e886eec1fd1932a34
with:
go-version-file: '${{ github.workspace }}/go.mod'
- uses: acifani/setup-tinygo@v2
with:
tinygo-version: '0.31.2'
- name: Restore Go cache
uses: actions/cache@v4
uses: actions/cache@0c907a75c2c80ebcb7f088228285e798b750cf8f
with:
path: /home/runner/work/_temp/_github_home/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
Expand Down
Loading