Skip to content

Commit

Permalink
common actions update (#171)
Browse files Browse the repository at this point in the history
* common actions update

* actions

* actions

* actions

* actions

* add back repctl gosec scan

---------

Co-authored-by: root <[email protected]>
  • Loading branch information
gilltaran and shaynafinocchiaro authored Nov 13, 2024
1 parent 4ca5a2b commit 5526515
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 107 deletions.
47 changes: 1 addition & 46 deletions .github/workflows/actions.yml
Original file line number Diff line number Diff line change
@@ -1,20 +1,10 @@
name: Workflow
on:
on: # yamllint disable-line rule:truthy
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
code-check:
name: Check Go formatting, linting, vetting
runs-on: ubuntu-latest
steps:
- name: Checkout the code
uses: actions/checkout@v4
- name: Run the formatter, linter, and vetter
uses: dell/common-github-actions/go-code-formatter-linter-vetter@main
with:
directories: ./...
sanitize:
name: Check for forbidden words
runs-on: ubuntu-latest
Expand All @@ -25,30 +15,6 @@ jobs:
uses: dell/common-github-actions/code-sanitizer@main
with:
args: /github/workspace
test:
permissions: write-all
name: Run Go unit tests and check package coverage
runs-on: ubuntu-latest
steps:
- name: Checkout the code
uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: "1.23"
- run: cd repctl && make test
- name: Run unit tests and check package coverage
run: make unit-test
go_security_scan:
permissions: write-all
name: Go security - Main Folder
runs-on: ubuntu-latest
steps:
- name: Checkout the code
uses: actions/checkout@v4
- name: Run Go Security - Main Folder
uses: securego/gosec@master
with:
args: -exclude-dir=repctl ./...
go_security_scan_repctl:
permissions: write-all
name: Go security - Repctl
Expand All @@ -62,17 +28,6 @@ jobs:
run: cd ./repctl && tar xzf gosec_2.19.0_linux_amd64.tar.gz
- name: GoSec scan
run: cd ./repctl && ./gosec ./...
malware_security_scan:
name: Malware Scanner
runs-on: ubuntu-latest
steps:
- name: Checkout the code
uses: actions/checkout@v4
- name: Run malware scan
uses: dell/common-github-actions/malware-scanner@main
with:
directories: .
options: -ri
image_security_scan:
name: Image Scanner
runs-on: ubuntu-latest
Expand Down
17 changes: 17 additions & 0 deletions .github/workflows/common-workflow.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
name: Common Workflows
on: # yamllint disable-line rule:truthy
push:
branches: [main]
pull_request:
branches: ["**"]

jobs:

# golang static analysis checks
go-static-analysis:
uses: dell/common-github-actions/.github/workflows/go-static-analysis.yaml@main
name: Golang Validation

common:
name: Quality Checks
uses: dell/common-github-actions/.github/workflows/go-common.yml@main
2 changes: 1 addition & 1 deletion .github/workflows/go-version.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
# Reusable workflow to perform go version update on Golang based projects
name: Go Version Update

on:
on: # yamllint disable-line rule:truthy
workflow_dispatch:
repository_dispatch:
types: [go-update-workflow]
Expand Down
30 changes: 0 additions & 30 deletions .github/workflows/linters.yaml

This file was deleted.

30 changes: 0 additions & 30 deletions .golangci.yaml

This file was deleted.

0 comments on commit 5526515

Please sign in to comment.