Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/dhiguero/gpm-github-action
A GitHub action for GPM to generate protobuf stubs
https://github.com/dhiguero/gpm-github-action
Last synced: about 1 month ago
JSON representation
A GitHub action for GPM to generate protobuf stubs
- Host: GitHub
- URL: https://github.com/dhiguero/gpm-github-action
- Owner: dhiguero
- License: apache-2.0
- Created: 2020-11-24T19:05:46.000Z (about 4 years ago)
- Default Branch: main
- Last Pushed: 2020-12-02T16:16:17.000Z (about 4 years ago)
- Last Synced: 2024-10-16T10:37:26.227Z (3 months ago)
- Language: Shell
- Size: 6.84 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# GPM GitHub Action
This action leverages [GPM](https://github.com/dhiguero/grpc-proto-manager) to compile and generate protobuf stubs from a given protorepo. GitHub Actions is a convenient way to integrate CI/CD operations into the development process. With this action attached to a protorepo, a pull request can be checked by compiling the resulting protobuf code, and generated protobuf code in different languages can be generated and pushed on the merge event.
## Inputs
### `debug`
**Required** Whether debug information must be shown. Default `"false"`.
### `skipPublish`
**Required** This flags controls whether the process pushes the generated code to the repositories that have been modified. Set this to false for use on pull requests, and set this flag to true for pushing new code on merge events. Default `"false"`.
### `accessToken`
**Optional** This flags allows specifying a [GitHub Personal Access Tokens](https://docs.github.com/en/free-pro-team@latest/github/authenticating-to-github/creating-a-personal-access-token) that is required to pull and push code to private repositories.
## Outputs
### `time`
The time the action was executed.
## Example usage
Pushing new code on merge working with private repositories. A [secret](https://docs.github.com/en/free-pro-team@latest/actions/reference/encrypted-secrets) with the personal access token has been defined as `GPM_PAT`.
```
on: [push]jobs:
generate_protos:
runs-on: ubuntu-latest
name: Compile and push new protos
steps:
- name: Checkout
uses: actions/checkout@v2
- name: GPM
uses: dhiguero/[email protected]
id: gpm
with:
debug: 'false'
skipPublish: 'false'
accessToken: ${{ secrets.GPM_PAT }}
```## References
- https://github.com/dhiguero/grpc-proto-manager
- https://docs.github.com/en/free-pro-team@latest/github/authenticating-to-github/creating-a-personal-access-token
- https://docs.github.com/en/free-pro-team@latest/actions/reference/encrypted-secrets