This repository contains a set of reusable actions and workflows, designed to be run with GitHub Actions.
GitHub Action to scan the source for non-inclusive words and language.
GitHub Action to run go formatter, linter, and vetter scans against the GO source files
GitHub Action to run code coverage against GO source
GitHub Action to run ClamScan AntiVirus Scan against source
In addition to the actions mentioned above, the repository contains workflows that are used by various projects.
This workflow runs static analysis checks against repositories that utilize Golang as the primary development language. The jobs that are run include:
- golanci-lint with gofumpt (stricter version of gofmt), gosec, govet, and revive (replacement for golint). The configuration file for this job can be found at .github/configs/golangci-lint/golangci.yaml
- malware_security_scan, which is the malware-scanner mentioned above
- yaml_lint_scan which validates yaml files. The yamllint config file for this job is at .github/configs/yamllint/yamllint.yaml
The workflow does not accept any parameters and can be used from any repo by creating a workflow that resembles the following
name: Workflow
on:
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
This workflow automates the release process for all the Go Client Libraries:
The workflow accepts version as an input and releases that particular version. Below is the example usage in gobrick repository. If no version is specified then it will automatically bump up the major version.
name: Release Gobrick
# Invocable as a reusable workflow
# Can be manually triggered
on:
workflow_call:
workflow_dispatch:
inputs:
version:
description: 'Version to release (major, minor, patch)'
required: true
default: 'none'
jobs:
csm-release:
uses: dell/common-github-actions/.github/workflows/csm-release-libs.yaml@main
name: Release Go Client Libraries
This workflow updates to the latest go version in repositories that utilize Golang as the primary development language. The workflow is triggered by https://github.com/dell/common-github-actions/actions/workflows/trigger-go-workflow.yaml or can be triggered manually.
The workflow does not accept any parameters and can be used from any repository by creating a workflow that resembles the following Note: Workflows that call reusable workflows in the same organization or enterprise can use the inherit keyword to implicitly pass the secrets. See: https://docs.github.com/en/actions/sharing-automations/reusing-workflows#passing-inputs-and-secrets-to-a-reusable-workflow.
name: Go Version Update
on:
workflow_dispatch:
repository_dispatch:
types: [go-update-workflow]
jobs:
go-version-update:
uses: dell/common-github-actions/.github/workflows/go-version-workflow.yaml@main
name: Go Version Update
secrets: inherit
Don’t hesitate to ask! Contact the team and community on our support. Open an issue if you found a bug on Github Issues.
This project is adhering to Semantic Versioning.
The GitHub Actions implemented in this repo are 100% open source and community-driven. All components are available under Apache 2 License on GitHub.