Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/willin/cicd-sop

CI/CD SOP project/template using Github Actions. 指在快速搭建项目 CI/CD 流水线的通用模板
https://github.com/willin/cicd-sop

action cicd github github-action template

Last synced: 17 days ago
JSON representation

CI/CD SOP project/template using Github Actions. 指在快速搭建项目 CI/CD 流水线的通用模板

Awesome Lists containing this project

README

        

# CICD SOP Template

- [Branches](#branches)
- [Workflows](#workflows)
- [Test](#test)
- [Deploy to Dev](#deploy-to-dev)
- [Deploy to Prod](#deploy-to-prod)
- [LICENSE](#license)

## Branches

- Production ENV: `main` (Recommended), `master`
- Development ENV: `dev`(Recommended), `development`

Or others, you may add it manually.

[![](https://mermaid.ink/img/eyJjb2RlIjoic3RhdGVEaWFncmFtLXYyXG4gICAgWypdIC0tPiBjMTogQ29kaW5nIG9uIGJyYW5jaCBmZWF0L2ZpeC8uLi5cbiAgICBjMTogUHVzaCB0byBicmFuY2ggZmVhdC9maXgvLi4uXG4gICAgYzEgLS0-IHByX29uX2RldjogUHVsbCByZXF1ZXN0IHRvIGRldlxuICAgIHN0YXRlIHByX29uX2RldiB7XG4gICAgICAgIHQxOiBUZXN0XG4gICAgfVxuICAgIHByX29uX2RldiAtLT4gZGV2OiBTcXVhc2ggJiBNZXJnZVxuICAgIHN0YXRlIGRldiB7XG4gICAgICAgIGRpcmVjdGlvbiBMUlxuICAgICAgICBkMTogUHVibGlzaCBEY29rZXIgaW1hZ2VcbiAgICAgICAgZDI6IFRlc3RcbiAgICAgICAgZDM6IERlcG95IHRvIGRldlxuICAgICAgICBkMSAtLT4gZDJcbiAgICAgICAgZDIgLS0-IGQzXG4gICAgfVxuICAgIGRldiAtLT4gcHJfb25fbWFpbjogUHVsbCByZXF1ZXN0IHRvIG1haW5cbiAgICBzdGF0ZSBwcl9vbl9tYWluIHtcbiAgICAgICAgdDI6IFRlc3RcbiAgICB9XG4gICAgcHJfb25fbWFpbiAtLT4gcHJvZDogU3F1YXNoICYgTWVyZ2VcbiAgICBzdGF0ZSBwcm9kIHtcbiAgICAgICAgZGlyZWN0aW9uIExSXG4gICAgICAgIHAxOiBQdWJsaXNoIERjb2tlciBpbWFnZVxuICAgICAgICBwMjogVGVzdFxuICAgICAgICBwMzogRGVwb3kgdG8gcHJvZFxuICAgICAgICBwMSAtLT4gcDJcbiAgICAgICAgcDIgLS0-IHAzXG4gICAgfVxuICAgIHByb2QgLS0-IFsqXSIsIm1lcm1haWQiOnsidGhlbWUiOiJkZWZhdWx0In0sInVwZGF0ZUVkaXRvciI6ZmFsc2UsImF1dG9TeW5jIjp0cnVlLCJ1cGRhdGVEaWFncmFtIjpmYWxzZX0)](https://mermaid-js.github.io/mermaid-live-editor/edit##eyJjb2RlIjoic3RhdGVEaWFncmFtLXYyXG4gICAgWypdIC0tPiBjMTogQ29kaW5nIG9uIGJyYW5jaCBmZWF0L2ZpeC8uLi5cbiAgICBjMTogUHVzaCB0byBicmFuY2ggZmVhdC9maXgvLi4uXG4gICAgYzEgLS0-IHByX29uX2RldjogUHVsbCByZXF1ZXN0IHRvIGRldlxuICAgIHN0YXRlIHByX29uX2RldiB7XG4gICAgICAgIHQxOiBUZXN0XG4gICAgfVxuICAgIHByX29uX2RldiAtLT4gZGV2OiBTcXVhc2ggJiBNZXJnZVxuICAgIHN0YXRlIGRldiB7XG4gICAgICAgIGRpcmVjdGlvbiBMUlxuICAgICAgICBkMTogUHVibGlzaCBEY29rZXIgaW1hZ2VcbiAgICAgICAgZDI6IFRlc3RcbiAgICAgICAgZDM6IERlcG95IHRvIGRldlxuICAgICAgICBkMSAtLT4gZDJcbiAgICAgICAgZDIgLS0-IGQzXG4gICAgfVxuICAgIGRldiAtLT4gcHJfb25fbWFpbjogUHVsbCByZXF1ZXN0IHRvIG1haW5cbiAgICBzdGF0ZSBwcl9vbl9tYWluIHtcbiAgICAgICAgdDI6IFRlc3RcbiAgICB9XG4gICAgcHJfb25fbWFpbiAtLT4gcHJvZDogU3F1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gICBwM1tUZXN0XSAtLT5cbiAgICAgICAgcDRbRGVwbG95IHRvIFByb2RdXG4gICAgZW5kXG4gICAgZGVwb3ktcHJvZCAtLT4gRW5kIiwibWVybWFpZCI6IntcbiAgXCJ0aGVtZVwiOiBcImRlZmF1bHRcIlxufSIsInVwZGF0ZUVkaXRvciI6ZmFsc2UsImF1dG9TeW5jIjp0cnVlLCJ1cGRhdGVEaWFncmFtIjpmYWxzZX0)

Trigger Types:

- `test.yml`: Auto
- `deploy-dev.yml`: Auto
- `deploy-prod.yml`: Manual

### Test

Trggier: `pull_request`

On branches:

- all

[![](https://mermaid.ink/img/eyJjb2RlIjoiZmxvd2NoYXJ0IFREXG4gICAgU3RhcnQoW1N0YXJ0XSlcbiAgICBFbmQoW0VuZF0pXG5cbiAgICBTdGFydCAtLT4gdDFbL1B1bGwgUmVxdWVzdC9dIC0tPiB8QXV0byBUcmlnZ2VyfHByXG4gICAgc3ViZ3JhcGggcHIgW1dvcmtmbG93IHRlc3RdXG4gICAgICAgIHQyW1Rlc3RdXG4gICAgZW5kXG4gICAgcHIgLS0-IEVuZCIsIm1lcm1haWQiOnsidGhlbWUiOiJkZWZhdWx0In0sInVwZGF0ZUVkaXRvciI6ZmFsc2UsImF1dG9TeW5jIjp0cnVlLCJ1cGRhdGVEaWFncmFtIjpmYWxzZX0)](https://mermaid-js.github.io/mermaid-live-editor/edit##eyJjb2RlIjoiZmxvd2NoYXJ0IFREXG4gICAgU3RhcnQoW1N0YXJ0XSlcbiAgICBFbmQoW0VuZF0pXG5cbiAgICBTdGFydCAtLT4gZDFbL1B1c2ggdG8gYnJhbmNoIGRldi9kZXZlbG9wbWVudC9dIC0tPiB8QXV0byBUcmlnZ2VyfGRlcGxveS1kZXZcbiAgICBTdGFydCAtLT4gfE1hbnVhbCBUcmlnZ2VyfGRlcGxveS1kZXZcbiAgICBzdWJncmFwaCBkZXBsb3ktZGV2IFtXb3JrZmxvdyBkZXBsb3ktZGV2XVxuICAgICAgICBkMltQdWJsaXNoIERvY2tlciBpbWFnZV0gLS0-XG4gICAgICAgIGQzW1Rlc3RdIC0tPlxuICAgICAgICBkNFtEZXBsb3kgdG8gRGV2XVxuICAgIGVuZFxuICAgIGRlcGxveS1kZXYgLS0-IEVuZCIsIm1lcm1haWQiOiJ7XG4gIFwidGhlbWVcIjogXCJkZWZhdWx0XCJcbn0iLCJ1cGRhdGVFZGl0b3IiOmZhbHNlLCJhdXRvU3luYyI6dHJ1ZSwidXBkYXRlRGlhZ3JhbSI6ZmFsc2V9)

### Deploy to Dev

Trggier: `push`, or `manual`

On branches:

- dev
- development
- main
- master

[![](https://mermaid.ink/img/eyJjb2RlIjoiZmxvd2NoYXJ0IFREXG4gICAgU3RhcnQoW1N0YXJ0XSlcbiAgICBFbmQoW0VuZF0pXG5cbiAgICBTdGFydCAtLT4gZDFbL1B1c2ggdG8gYnJhbmNoIGRldi9kZXZlbG9wbWVudC9dIC0tPiB8QXV0byBUcmlnZ2VyfGRlcGxveS1kZXZcbiAgICBTdGFydCAtLT4gfE1hbnVhbCBUcmlnZ2VyfGRlcGxveS1kZXZcbiAgICBzdWJncmFwaCBkZXBsb3ktZGV2IFtXb3JrZmxvdyBkZXBsb3ktZGV2XVxuICAgICAgICBkMltQdWJsaXNoIERvY2tlciBpbWFnZV0gLS0-XG4gICAgICAgIGQzW1Rlc3RdIC0tPlxuICAgICAgICBkNFtEZXBsb3kgdG8gRGV2XVxuICAgIGVuZFxuICAgIGRlcGxveS1kZXYgLS0-IEVuZCIsIm1lcm1haWQiOnsidGhlbWUiOiJkZWZhdWx0In0sInVwZGF0ZUVkaXRvciI6ZmFsc2UsImF1dG9TeW5jIjp0cnVlLCJ1cGRhdGVEaWFncmFtIjpmYWxzZX0)](https://mermaid-js.github.io/mermaid-live-editor/edit##eyJjb2RlIjoiZmxvd2NoYXJ0IFREXG4gICAgU3RhcnQoW1N0YXJ0XSlcbiAgICBFbmQoW0VuZF0pXG5cbiAgICBTdGFydCAtLT4gZDFbUHVzaCB0byBicmFuY2ggZGV2L2RldmVsb3BtZW50XSAtLT4gfEF1dG8gVHJpZ2dlcnxkZXBsb3ktZGV2XG4gICAgU3RhcnQgLS0-IHxNYW51YWwgVHJpZ2dlcnxkZXBsb3ktZGV2XG4gICAgc3ViZ3JhcGggZGVwbG95LWRldiBbV29ya2Zsb3cgZGVwbG95LWRldl1cbiAgICAgICAgZDJbUHVibGlzaCBEb2NrZXIgaW1hZ2VdIC0tPlxuICAgICAgICBkM1tUZXN0XSAtLT5cbiAgICAgICAgZDRbRGVwbG95IHRvIERldl1cbiAgICBlbmRcbiAgICBkZXBsb3ktZGV2IC0tPiBFbmRcbmBgYCIsIm1lcm1haWQiOiJ7XG4gIFwidGhlbWVcIjogXCJkZWZhdWx0XCJcbn0iLCJ1cGRhdGVFZGl0b3IiOmZhbHNlLCJhdXRvU3luYyI6dHJ1ZSwidXBkYXRlRGlhZ3JhbSI6ZmFsc2V9)

### Deploy to Prod

Trggier: `manual`

On branches:

- main
- master

[![](https://mermaid.ink/img/eyJjb2RlIjoiZmxvd2NoYXJ0IFREXG4gICAgU3RhcnQoW1N0YXJ0XSlcbiAgICBFbmQoW0VuZF0pXG5cbiAgIFN0YXJ0IC0tPiB8TWFudWFsIFRyaWdnZXJ8ZGVwb3ktcHJvZFxuICAgIHN1YmdyYXBoIGRlcG95LXByb2QgW1dvcmtmbG93IGRlcG95LXByb2RdXG4gICAgICAgIHAyW1B1Ymxpc2ggRG9ja2VyIGltYWdlXSAtLT5cbiAgICAgICAgcDNbVGVzdF0gLS0-XG4gICAgICAgIHA0W0RlcGxveSB0byBQcm9kXVxuICAgIGVuZFxuICAgIGRlcG95LXByb2QgLS0-IEVuZCIsIm1lcm1haWQiOnsidGhlbWUiOiJkZWZhdWx0In0sInVwZGF0ZUVkaXRvciI6ZmFsc2UsImF1dG9TeW5jIjp0cnVlLCJ1cGRhdGVEaWFncmFtIjpmYWxzZX0)](https://mermaid-js.github.io/mermaid-live-editor/edit##eyJjb2RlIjoiZmxvd2NoYXJ0IFREXG4gICAgU3RhcnQoW1N0YXJ0XSlcbiAgICBFbmQoW0VuZF0pXG5cbiAgIFN0YXJ0IC0tPiB8TWFudWFsIFRyaWdnZXJ8ZGVwb3ktcHJvXG4gICAgc3ViZ3JhcGggZGVwb3ktcHJvIFtXb3JrZmxvdyBkZXBveS1wcm9dXG4gICAgICAgIHAyW1B1Ymxpc2ggRG9ja2VyIGltYWdlXSAtLT5cbiAgICAgICAgcDNbVGVzdF0gLS0-XG4gICAgICAgIHA0W0RlcGxveSB0byBQcm9kXVxuICAgIGVuZFxuICAgIGRlcG95LXBybyAtLT4gRW5kIiwibWVybWFpZCI6IntcbiAgXCJ0aGVtZVwiOiBcImRlZmF1bHRcIlxufSIsInVwZGF0ZUVkaXRvciI6ZmFsc2UsImF1dG9TeW5jIjp0cnVlLCJ1cGRhdGVEaWFncmFtIjpmYWxzZX0)

## LICENSE

Apache-2.0