Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/mathematic-inc/setup-buf
Set up your GitHub Actions workflow with a specific version of Buf
https://github.com/mathematic-inc/setup-buf
Last synced: 27 days ago
JSON representation
Set up your GitHub Actions workflow with a specific version of Buf
- Host: GitHub
- URL: https://github.com/mathematic-inc/setup-buf
- Owner: mathematic-inc
- License: mit
- Created: 2021-02-05T00:56:43.000Z (almost 4 years ago)
- Default Branch: main
- Last Pushed: 2021-04-28T04:30:16.000Z (over 3 years ago)
- Last Synced: 2024-10-31T10:48:17.650Z (about 2 months ago)
- Language: TypeScript
- Size: 18.2 MB
- Stars: 1
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
- Codeowners: CODEOWNERS
Awesome Lists containing this project
README
# setup-buf
![setup-buf](https://github.com/mu-io/setup-buf/workflows/CD/badge.svg)
This action sets up a buf environment for use in actions by:
- optionally downloading and caching a version of Buf by version and adding to PATH
It will first check the local cache for a version match. If version is not found locally, it will download directly from the [bufbuild/buf](https://github.com/bufbuild/buf/releases) repository.
Matching by semver spec:
```yaml
steps:
- uses: actions/checkout@v2
- uses: mu-io/setup-buf@v1beta
with:
buf-version: '0.36.0' # The Buf version to download (if necessary) and use.
token: ${{ secrets.GITHUB_TOKEN }} # Default token in GitHub Action to wave API request limits
- run: buf --version
```## Usage
See [action.yml](action.yml)
> Note: We reserve the `buf-version` `latest` for the latest release. Hence to obtain the latest release, just use `latest`.
> At this time, it is recommended to fix a version as Buf is still in pre-release.Basic:
```yaml
steps:
- uses: actions/checkout@master
- uses: mu-io/setup-buf@v1beta
with:
buf-version: '0.36.0' # The Buf version to download (if necessary) and use.
- run: buf generate
```Matrix Testing:
```yaml
jobs:
build:
runs-on: ubuntu-16.04
strategy:
matrix:
buf: [ '0.36.0', '0.35.0' ]
name: Buf ${{ matrix.buf }} sample
steps:
- uses: actions/checkout@v2
- uses: mu-io/setup-buf@v1beta
with:
buf-version: ${{ matrix.buf }}
token: ${{ secrets.GITHUB_TOKEN }} # Default token in GitHub Action to wave API request limits
- run: buf generate
```## License
The scripts and documentation in this project are released under the [MIT License](LICENSE).
## Contributions
Contributions are welcome! See [Contributor's Guide](docs/contributors.md).
### Code of Conduct
:wave: Be nice. See [our code of conduct](CONDUCT).