DevSecOpsSamples / github-actions

github actions for AWS, GCP, CDK, Terraform

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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


Languages

Language:Java 88.9%Language:Dockerfile 11.1%