|
1 | | -<h1 align="center">github-shared-workflows</h1> |
| 1 | +<h1 align="center">GitHub-Shared-Workflows</h1> |
| 2 | +<p align="center"> |
| 3 | +GitHub shared workflow defines a workflow that we can use in multiple repos with a simple structure. |
| 4 | +</p> |
2 | 5 |
|
3 | | -## SST Workflow |
4 | | - |
5 | | -This workflow is used to deploy serverless stack (SST) application on AWS environment. Workflows have been added in `.github/workflows/sst_workflow.yml`. |
6 | | - |
7 | | -Below workflow can be used to deploy SST in preview environment when pull request generated and it destroys the preview environment when pull request closed, merged and labeled as destroy, similarly staging and production is deployed using there defined branches. |
| 6 | +This repo offers to using a workflow with a simple calling structure and proper documentation. This shared workflow feature can overcome the issue of upgrading hundreds of workflows whenever any new updation is required. In this repo, we have many kinds of workflows related to Terraform, Kubernetes, Helm, SST, and regular workflows like maintain changelog, auto assignee, and many more. |
8 | 7 |
|
| 8 | +## How shared workflow use |
9 | 9 | ```yaml |
10 | | -name: SST Workflow |
11 | | - |
12 | | -on: |
13 | | - pull_request: |
14 | | - types: [closed, merged, labeled] |
15 | | - workflow_dispatch: |
16 | 10 | jobs: |
17 | | - preview: |
18 | | - uses: clouddrove/github-shared-workflows/.github/workflows/sst_workflow.yml@master |
19 | | - with: |
20 | | - app-env: # preview |
21 | | - working-directory: # specify your working folder from repo |
| 11 | + staging: # Job name |
| 12 | + uses: clouddrove/github-shared-workflows/.github/workflows/example.yml@master |
22 | 13 | secrets: |
23 | | - aws-access-key-id: # AWS Access Key ID for preview |
24 | | - aws-secret-access-key: # AWS Secret Access Key for preview |
25 | | - |
26 | | - staging: |
27 | | - if: ${{ github.base_ref == 'stage' }} |
28 | | - uses: clouddrove/github-shared-workflows/.github/workflows/sst_workflow.yml@master |
| 14 | + SECRET_1: |
| 15 | + SECRET_2: |
29 | 16 | with: |
30 | | - app-env: # stage |
31 | | - working-directory: # specify your working folder from repo |
32 | | - secrets: |
33 | | - aws-access-key-id: # AWS Access Key ID for stage |
34 | | - aws-secret-access-key: # AWS Secret Access Key for stage |
35 | | - |
36 | | - production: |
37 | | - if: ${{ github.base_ref == 'master' }} |
38 | | - uses: clouddrove/github-shared-workflows/.github/workflows/sst_workflow.yml@master |
39 | | - with: |
40 | | - app-env: # prod |
41 | | - working-directory: # specify your working folder from repo |
42 | | - secrets: |
43 | | - aws-access-key-id: # AWS Access Key ID for prod |
44 | | - aws-secret-access-key: # AWS Secret Access Key for prod |
| 17 | + input_1: |
| 18 | + input_2: |
45 | 19 | ``` |
| 20 | +Above example is just a simple example to call workflow from github shared workflow to your workflow and used in the jobs as per your requirements. |
| 21 | +
|
| 22 | +## 🚀 Table Of Content |
| 23 | +1. [SST Workflow](https://github.com/clouddrove/github-shared-workflows/blob/master/docs/sst.md) |
| 24 | +2. [Helm Workflow](https://github.com/clouddrove/github-shared-workflows/blob/master/docs/helm.md) |
| 25 | + * [Example for AWS cloud provider](https://github.com/clouddrove/github-shared-workflows/blob/master/docs/helm.md#example-for-aws-cloud-provider) |
| 26 | + * [Example for Azure cloud provider](https://github.com/clouddrove/github-shared-workflows/blob/master/docs/helm.md#example-for-azure-cloud-provider) |
| 27 | +3. [Docker Workflow](https://github.com/clouddrove/github-shared-workflows/blob/master/docs/docker.md) |
| 28 | + * [Example for scan and push docker image on Dockerhub](https://github.com/clouddrove/github-shared-workflows/blob/master/docs/docker.md#example-for-scan-and-push-docker-image-on-dockerhub) |
| 29 | + * [Example for scan and push docker image on ECR](https://github.com/clouddrove/github-shared-workflows/blob/master/docs/docker.md#example-for-scan-and-push-docker-image-on-ecr) |
| 30 | +
|
46 | 31 | ## Feedback |
47 | | -If you come accross a bug or have any feedback, please log it in our [issue tracker](https://github.com/clouddrove/terraform-azure-aks/issues), or feel free to drop us an email at [[email protected]](mailto:[email protected]). |
| 32 | +If you come accross a bug or have any feedback, please log it in our [issue tracker](https://github.com/clouddrove/github-shared-workflows/issues), or feel free to drop us an email at [[email protected]](mailto:[email protected]). |
48 | 33 |
|
49 | | -If you have found it worth your time, go ahead and give us a ★ on [our GitHub](https://github.com/clouddrove/terraform-azure-aks)! |
| 34 | +If you have found it worth your time, go ahead and give us a ★ on [our GitHub](https://github.com/clouddrove/github-shared-workflows)! |
50 | 35 |
|
51 | 36 | ## About us |
52 | 37 |
|
|
0 commit comments