Skip to content

Commit

Permalink
update readme
Browse files Browse the repository at this point in the history
Signed-off-by: Gangadhar Sunkara <[email protected]>
  • Loading branch information
gangadhar3303 committed Feb 1, 2024
1 parent d71021d commit 2283181
Show file tree
Hide file tree
Showing 4 changed files with 94 additions and 3 deletions.
Binary file added .DS_Store
Binary file not shown.
23 changes: 21 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,12 @@ This GitHub Actions workflow sets up a build pipeline for Docker images on Googl

- Building and pushing Docker images to Google Cloud Artifact Registry.
- Scanning Docker images for vulnerabilities and checking for critical severity.
- Signing Docker images using Binary Authorization.
- Signing Docker images for Binary Authorization.
- Updating Helm chart values with the latest Docker image details.
- Automatically committing changes to the Helm values file.

The custom action code is in `action.yml` file in the root directory of this repo.

## Inputs
The workflow accepts the following parameters:

Expand Down Expand Up @@ -65,4 +67,21 @@ To use this workflow, provide the required inputs when triggering the workflow r
keyversion_project: ${{ env.ATTESTOR_PROJECT_ID }}
keyversion_location: ${{ env.GAR_LOCATION }}
keyversion_keyring: ${{ env.KEY_RING }}
keyversion_key: ${{ env.KEY }}
keyversion_key: ${{ env.KEY }}

## Updating the custom action

In the future, if you like to update the pipeline code, you can follow the procedure outlined below:

* Create a feature branch from the main branch.
* Modify the _action.yml_ file within the feature branch and commit the changes.
* Assign a tag to the committed branch, such as `v2-test-feature`.
* Push the changes to GitHub along with the assigned tag.
* In the other repository, employ the action using the following syntax: `uses: 0xPolygon/pipelines@v2-test-feature ` and verify that everything is functioning as expected.
* If all tests pass, merge the changes into the main branch and create a new release tag, for instance, `v2`.
* Subsequently, you can utilize this custom action by referencing uses: `0xPolygon/pipelines@v2`.
* You can delete the tags that used for testing (`v2-test-feature`).

## References

* Implementing custom action: https://docs.github.com/en/actions/creating-actions/creating-a-composite-action
2 changes: 1 addition & 1 deletion action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -137,4 +137,4 @@ runs:
uses: stefanzweifel/git-auto-commit-action@v5
with:
commit_message: Apply automatic changes to Update image repository in Helm values
file_pattern: ${{ inputs.helm_values_path }}
file_pattern: ${{ inputs.helm_values_path }}
72 changes: 72 additions & 0 deletions docs/gcp-build-pipeline.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
<!-- PROJECT SHIELDS -->
![Build][Build-badge]
[![Coverage][Coverage-badge]][Sonar-url]
[![Vulnerabilities][Vulnerability-badge]][Sonar-url]

# 0xPolygon Pipelines
This repo serves as the repository for shared pipelines across the Polygon organization. To learn more about using
shared pipelines, please see the [Shared Pipelines Documentation](https://docs.github.com/en/actions/creating-actions/sharing-actions-and-workflows-with-your-organization).

### Built With

![Static Badge](https://img.shields.io/badge/alcohol-sarcasm-8A2BE2?logo=polygon)

## Getting Started

### Local Development

## Usage

To use this workflow, provide the required inputs when triggering the workflow run. Ensure that the necessary secrets and permissions are configured in your GitHub repository for GCP authentication and Docker image pushing.

steps:
- id: gcp-build-action
uses: 0xPolygon/pipelines@v1
with:
workload_identity_provider: ${{ env.WIF_PROVIDER }}
service_account: ${{ env.WIF_SERVICE_ACCOUNT }}
gar_location: ${{ env.GAR_LOCATION }}
docker_image: ${{ env.IMAGE_NAME }}
dockerfile_name: Dockerfile
dockerfile_path: .
critical_count: ${{ env.CRITICAL_COUNT }}
helm_values_path: './helm-chart/values.yaml'
attestor: ${{ env.ATTESTOR }}
attestor_project: ${{ env.ATTESTOR_PROJECT_ID }}
keyversion_project: ${{ env.ATTESTOR_PROJECT_ID }}
keyversion_location: ${{ env.GAR_LOCATION }}
keyversion_keyring: ${{ env.KEY_RING }}
keyversion_key: ${{ env.KEY }}

Read more info: [gcp-build-pipeline](./docs/gcp-build-pipeline.md)

## Contributing

This is the place to document your delivery workflow. For example:

1. Clone the project
2. Create a feature branch beginning with the ticket number (`git checkout -b INC-7689/update-readme`)
3. Commit your changes (`git commit -m 'Update README.me with default template`)
4. Push to the branch (`git push origin INC-7689/update-readme`)
5. Open a Pull Request
6. After review and approval, changes are deployed immediately

## Contact

![Email][Email-badge]
![Slack][Slack-badge]


<!-- MARKDOWN LINKS AND IMAGES (update/replace as needed for your application) -->
[Build-badge]: https://github.com/0xPolygon/learn-api/actions/workflows/main.yml/badge.svg
[Coverage-badge]: https://sonarqube.polygon.technology/api/project_badges/measure?project=TODO
[Vulnerability-badge]: https://sonarqube.polygon.technology/api/project_badges/measure?project=TODO
[Sonar-url]: https://sonarqube.polygon.technology/dashboard?id=TODO
[Language-badge]: https://img.shields.io/badge/Nodejs-18.0-informational
[Language-url]: https://nodejs.org/en
[Email-badge]: https://img.shields.io/badge/[email protected]?logo=gmail
[Slack-badge]: https://img.shields.io/badge/Slack-team_devops-informational?logo=slack
[Production-badge]: https://img.shields.io/badge/Production_URL-polygon.technology-informational
[Production-url]: https://link.to/prod
[Staging-badge]: https://img.shields.io/badge/Staging_URL-staging.polygon.technology-informational
[Staging-url]: https://link.to/staging

0 comments on commit 2283181

Please sign in to comment.