Skip to content

Commit

Permalink
Add github action for blackduck scan (#2)
Browse files Browse the repository at this point in the history
Gleb Levitin <[email protected]>, Mercedes-Benz Tech Innovation GmbH

Gleb Levitin <[email protected]>, Mercedes-Benz Tech Innovation GmbH
  • Loading branch information
levitin committed Nov 6, 2024
1 parent 0103ddf commit 1ef62a2
Show file tree
Hide file tree
Showing 6 changed files with 45 additions and 10 deletions.
File renamed without changes.
File renamed without changes
31 changes: 31 additions & 0 deletions .github/workflows/blackduck.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: Blackduck Scan

on:
push:
branches:
- main
pull_request:
branches:
- main
schedule:
- cron: "0 3 * * *"

jobs:
blackduck-scan:
name: BlackDuck Scan
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4

- name: BlackDuck Scan
uses: synopsys-sig/[email protected]
env:
DETECT_PROJECT_NAME: ${{ github.repository }}
DETECT_PROJECT_VERSION_LICENSE: MIT License
DETECT_GO_MOD_DEPENDENCY_TYPES_EXCLUDED: UNUSED
DETECT_POLICY_CHECK_FAIL_ON_SEVERITIES: ALL
with:
blackduck_url: ${{ secrets.BLACKDUCK_URL }}
blackduck_token: ${{ secrets.BLACKDUCK_API_TOKEN }}
blackduck_scan_full: ${{ github.event_name != 'pull_request' }}
Original file line number Diff line number Diff line change
@@ -1,13 +1,16 @@
name: Build and Test
name: Build Application

on:
push:
branches: [ "main" ]
branches:
- main
pull_request:
branches: [ "main" ]
branches:
- main

jobs:
build-and-test:
build:
name: Build Application
runs-on: ubuntu-latest
steps:
- name: Checkout code
Expand All @@ -16,7 +19,7 @@ jobs:
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: '^1.23'
go-version: 1.23

- name: Cache Go modules
uses: actions/cache@v4
Expand All @@ -28,7 +31,7 @@ jobs:
restore-keys: |
${{ runner.os }}-go-
- name: Build
- name: Build Application
run: go build -v ./...

- name: Run Tests
Expand Down
7 changes: 4 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
# Gitflow-CLI

[![Build and Test](https://github.com/mercedes-benz/gitflow-cli/actions/workflows/build-and-test.yml/badge.svg)](https://github.com/mercedes-benz/gitflow-cli/actions/workflows/build-and-test.yml)
[![build](https://github.com/mercedes-benz/gitflow-cli/actions/workflows/build.yml/badge.svg)](https://github.com/mercedes-benz/gitflow-cli/actions/workflows/build.yml)
<!--[![blackduck](https://github.com/mercedes-benz/gitflow-cli/actions/workflows/blackduck.yml/badge.svg)](https://github.com/mercedes-benz/gitflow-cli/actions/workflows/blackduck.yml)-->

Gitflow is a branching model that organizes feature development, releases, and hotfixes into dedicated branches,
providing a structured approach for managing complex software projects with routine release timelines.

The **gitflow-cli** automates release workflow process, saving considerable time and reducing the risk of errors.
It keeps your Git graph clean and consistent, enhancing project stability through semantic versioning.

<img src="assets/gitflow-cli-demo.png" alt="gitflow-cli-demo" width="700" />
<img src=".github/assets/gitflow-cli-demo.png" alt="gitflow-cli-demo" width="700" />

## Installation

Expand Down Expand Up @@ -106,7 +107,7 @@ If you want to contribute to this project, please read the [contributing guide](
To contribute to **gitflow-cli**, we suggest setting up the Git hook below to comply with our contribution guidelines.

```bash
cp hooks/prepare-commit-msg .git/hooks/
cp .githooks/prepare-commit-msg .git/hooks/
chmod +x .git/hooks/prepare-commit-msg
```

Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module github.com/mercedes-benz/gitflow-cli

go 1.22.5
go 1.23.2

require (
github.com/spf13/cobra v1.8.1
Expand Down

0 comments on commit 1ef62a2

Please sign in to comment.