Skip to content

DevSecOpsSamples/github-actions

Repository files navigation

GitHub Actions

Build Quality Gate Status Lines of Code

Overview

Provides GitHub Workflow and Action samples.

Sample Repositories

Repository Workflow File Actions Description Plugins
gke-workload-identity build.yml actions GCP, gcloud, Docker, Terraform
Python, pytest, publish unittest result, Sonarqube
hashicorp/setup-terraform@v2.0.3
jacobtomlinson/gha-find-replace@v2
actions/github-script@v6
actions/setup-java@v1
actions/setup-python@v4
google-github-actions/auth@v1
EnricoMi/publish-unit-test-result-action/composite@v2
actions/cache@v3
jenkins-fargate-cdk build.yml actions Docker, CDK, Sonarqube

Docker

Cache

Matrix

Terraform

Python Unittest

Plugins

Plugin Description
actions/setup-java@v3
actions/setup-python@v4
actions/cache@v3
actions/github-script@v6
hashicorp/setup-terraform@v2.0.3
jacobtomlinson/gha-find-replace@v2 Find and Replace Action
google-github-actions/auth@v1 GitHub Action authenticates to Google Cloud
EnricoMi/publish-unit-test-result-action/composite@v2 Publish Test Results

Dispatch

cp .github/workflows/dispatch-request-exmple.json request-body.json
cat request-body.json

curl -d @request-body.json \
  -H "Accept: application/vnd.github+json" \
  -H "X-GitHub-Api-Version: 2022-11-28" \
  -H "Authorization: Bearer <your-token>" \
  https://github.com/DevSecOpsSamples/githubactions/actions/workflows/dispatch-example.yml/dispatches

develop branch:

.github/workflows/dispatch-request-exmple.json

{ 
   "ref": "develop",
    "inputs": {
        "test-url-tag": "gcr.io/project-id/source-image:2650c2f7c04640b8c67df560510914f7ba2033e2",
        "prod-url": "gcr.io/project-id/target-image"
    }
}

master branch:

{ 
   "ref": "develop",
    "inputs": {
        "test-url-tag": "gcr.io/project-id/source-image:2650c2f7c04640b8c67df560510914f7ba2033e2",
        "prod-url": "gcr.io/project-id/target-image"
    }
}

Reference

About

github actions for AWS, GCP, CDK, Terraform

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published