Provides GitHub Workflow and Action samples.
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 |
- Build multi-platform docker image files: docker-buildx-gcr.yml
-
Optimize build speed using the
cache
plugin: java/README.md
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 |
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"
}
}