github-actions-templates icon indicating copy to clipboard operation
github-actions-templates copied to clipboard

Reusable GitHub Actions workflow examples for cloud native DevOps

Docker GitHub Actions DevOps Examples

Lint Code Base Docker Build Snyk Scan Trivy Scan

See this repositories .github directory for examples on linters, workflows, and dependabot.

Examples

  • .github/dependabot.yml will make PRs for version updates to your workflow steps.

  • .github/linters/ stores linter configs used by Super-Linter.

  • .github/workflows/call-super-linter.yaml is a workflow that calls Super-Linter, which I'm storing the full reusable workflow in bretfisher/super-linter-workflow.

  • .github/workflows/call-docker-build.yaml is a workflow that calls a Docker build advanced workflow, which I'm storing the full reusable workflow in bretfisher/docker-build-workflow.

  • .github/workflows/call-snyk-scan-image.yaml is a workflow that calls a Snyk scan image at .github/workflows/reusable-snyk-scan-image.yaml.

  • .github/workflows/call-trivy-scan-image.yaml is a workflow that calls a Trivy scan image at .github/workflows/reusable-trivy-scan-image.yaml.

Some workflows are reusable or are calling other reusable workflows in other repositories.

I name workflows depending on how they are used:

  • reusable-*.yaml - the workflow is designed to be reusable as a "called" workflow, and have a workflow_call event in them. They would exist in a central repository that is either public or internal and called by other repositories.
  • call-*.yaml - this calls a reusable workflow that lives in other repositories or files with uses: <github-path>.
  • Any other workflows are just designed to run inside a repository directly.

This repository is part of my example repos on GitHub Actions

More reading

🎉🎉🎉 Join my container DevOps community 🎉🎉🎉