diff --git a/README.md b/README.md index 1a388a7..d1d3b92 100644 --- a/README.md +++ b/README.md @@ -5,9 +5,6 @@ [![ci](https://github.com/bufbuild/buf-action/actions/workflows/ci.yaml/badge.svg?branch=main)][ci] [![slack](https://img.shields.io/badge/slack-buf-%23e01563)][slack] -> [!CAUTION] -> This is in alpha and is under development, stay tuned! - This GitHub action makes it easy to run [`buf`][buf] within a workflow to check for [build](https://buf.build/docs/reference/cli/buf/build), [lint](https://buf.build/docs/lint/overview), @@ -36,7 +33,7 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - - uses: bufbuild/buf-action@v0.3 + - uses: bufbuild/buf-action@v1 with: token: ${{ secrets.BUF_TOKEN }} ``` @@ -56,7 +53,7 @@ To customize the behavior of the action, you can set the following parameters in Add these parameters under the `with` section of the `uses` step in the workflow file. ```yaml -- uses: bufbuild/buf-action@v0.3 +- uses: bufbuild/buf-action@v1 with: ... ``` @@ -101,7 +98,7 @@ To disable parts of the workflow, each step corresponds to a boolean flag in the For example to disable formatting set the parameter `format` to `false`: ```yaml -- uses: bufbuild/buf-action@v0.3 +- uses: bufbuild/buf-action@v1 with: format: false ``` @@ -113,7 +110,7 @@ See [action.yml](action.yml) for all available parameters. For reproducible builds, you can pin to an explicit version of `buf` by setting `version`. ```yaml -- uses: bufbuild/buf-action@v0.3 +- uses: bufbuild/buf-action@v1 with: version: 1.35.0 ``` @@ -133,7 +130,7 @@ To authenticate with the BSR, set the API token as the parameter `token`. Generate a token from the [BSR UI](https://buf.build/docs/bsr/authentication#create-an-api-token) and add it to the [repository secrets](https://docs.github.com/en/actions/reference/encrypted-secrets). ```yaml -- uses: bufbuild/buf-action@v0.3 +- uses: bufbuild/buf-action@v1 with: token: ${{ secrets.BUF_TOKEN }} ``` @@ -163,7 +160,7 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - - uses: bufbuild/buf-action@v0.3 + - uses: bufbuild/buf-action@v1 with: token: ${{ secrets.BUF_TOKEN }} + pr_comment: false @@ -175,7 +172,7 @@ To run the action for parameters not declared at the root of the repository, set the parameter `input` to the directory of your `buf.yaml` file. ```yaml -- uses: bufbuild/buf-action@v0.3 +- uses: bufbuild/buf-action@v1 with: input: ``` @@ -184,7 +181,7 @@ Breaking change detection by default will use the `input` value as a subdirector To customize this behavior, set the parameter `breaking_against` to the desired input. ```yaml -- uses: bufbuild/buf-action@v0.3 +- uses: bufbuild/buf-action@v1 with: input: breaking_against: ${{ github.event.repository.clone_url }}#format=git,commit=${{ github.event.pull_request.base.sha }},subdir= @@ -201,7 +198,7 @@ and then set the value of `breaking_against` to the path of the base. with: path: base ref: ${{ github.event.pull_request.base.sha }} -- uses: bufbuild/buf-action@v0.3 +- uses: bufbuild/buf-action@v1 with: input: head/ breaking_against: base/ @@ -216,7 +213,7 @@ This will install `buf` and optionally login to the schema registry but no addit Subsequent steps will have `buf` available in their $PATH and can invoke `buf` directly. ```yaml -- uses: bufbuild/buf-action@v0.3 +- uses: bufbuild/buf-action@v1 with: setup_only: true - run: buf build --error-format github-actions @@ -230,7 +227,7 @@ To trigger steps on different events use the GitHub action context to deduce the For example to enable formatting checks on both pull requests and push create an expression for the parameter `format`: ```yaml -- uses: bufbuild/buf-action@v0.3 +- uses: bufbuild/buf-action@v1 with: format: ${{ contains(fromJSON('["push", "pull_request"]'), github.event_name) }} ``` @@ -243,7 +240,7 @@ To conditionally run checks based on user input, use the GitHub action context t For example to disable breaking change detection on commits, create an expression on the parameter `breaking` to check the contents of the commit message: ```yaml -- uses: bufbuild/buf-action@v0.3 +- uses: bufbuild/buf-action@v1 with: breaking: | contains(fromJSON('["push", "pull_request"]'), github.event_name) && diff --git a/examples/buf-ci.yaml b/examples/buf-ci.yaml index 2f68509..dcfddf3 100644 --- a/examples/buf-ci.yaml +++ b/examples/buf-ci.yaml @@ -13,6 +13,6 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - - uses: bufbuild/buf-action@v0.3 + - uses: bufbuild/buf-action@v1 with: token: ${{ secrets.BUF_TOKEN }} diff --git a/examples/disable-skip/buf-ci.yaml b/examples/disable-skip/buf-ci.yaml index 4f340d8..65ea635 100644 --- a/examples/disable-skip/buf-ci.yaml +++ b/examples/disable-skip/buf-ci.yaml @@ -15,7 +15,7 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - - uses: bufbuild/buf-action@v0.3 + - uses: bufbuild/buf-action@v1 with: token: ${{ secrets.BUF_TOKEN }} breaking: ${{ github.event_name == 'pull_request' }} diff --git a/examples/only-checks/buf-ci.yaml b/examples/only-checks/buf-ci.yaml index 818269d..58dea69 100644 --- a/examples/only-checks/buf-ci.yaml +++ b/examples/only-checks/buf-ci.yaml @@ -11,4 +11,4 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - - uses: bufbuild/buf-action@v0.3 + - uses: bufbuild/buf-action@v1 diff --git a/examples/only-setup-defaults/buf-ci.yaml b/examples/only-setup-defaults/buf-ci.yaml index ef1dca7..cccf2af 100644 --- a/examples/only-setup-defaults/buf-ci.yaml +++ b/examples/only-setup-defaults/buf-ci.yaml @@ -14,7 +14,7 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - - uses: bufbuild/buf-action@v0.3 + - uses: bufbuild/buf-action@v1 with: setup_only: true - env: diff --git a/examples/only-setup/buf-ci.yaml b/examples/only-setup/buf-ci.yaml index febe032..b2c7ad9 100644 --- a/examples/only-setup/buf-ci.yaml +++ b/examples/only-setup/buf-ci.yaml @@ -10,7 +10,7 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - - uses: bufbuild/buf-action@v0.3 + - uses: bufbuild/buf-action@v1 with: # Add the parameter token as a secret in your repository settings # to authenticate with the Buf Schema Registry. diff --git a/examples/only-sync/buf-ci.yaml b/examples/only-sync/buf-ci.yaml index 2e5abda..3b6a9d4 100644 --- a/examples/only-sync/buf-ci.yaml +++ b/examples/only-sync/buf-ci.yaml @@ -10,6 +10,6 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - - uses: bufbuild/buf-action@v0.3 + - uses: bufbuild/buf-action@v1 with: token: ${{ secrets.BUF_TOKEN }} diff --git a/examples/push-on-changes/buf-ci.yaml b/examples/push-on-changes/buf-ci.yaml index 1167a5a..c4e48bc 100644 --- a/examples/push-on-changes/buf-ci.yaml +++ b/examples/push-on-changes/buf-ci.yaml @@ -19,6 +19,6 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - - uses: bufbuild/buf-action@v0.3 + - uses: bufbuild/buf-action@v1 with: token: ${{ secrets.BUF_TOKEN }} diff --git a/examples/skip-on-commits/buf-ci.yaml b/examples/skip-on-commits/buf-ci.yaml index dc78a93..b7582b7 100644 --- a/examples/skip-on-commits/buf-ci.yaml +++ b/examples/skip-on-commits/buf-ci.yaml @@ -10,7 +10,7 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - - uses: bufbuild/buf-action@v0.3 + - uses: bufbuild/buf-action@v1 with: token: ${{ secrets.BUF_TOKEN }} lint: | diff --git a/examples/skip-on-labels/buf-ci.yaml b/examples/skip-on-labels/buf-ci.yaml index ae48b3b..37637a8 100644 --- a/examples/skip-on-labels/buf-ci.yaml +++ b/examples/skip-on-labels/buf-ci.yaml @@ -12,7 +12,7 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - - uses: bufbuild/buf-action@v0.3 + - uses: bufbuild/buf-action@v1 with: token: ${{ secrets.BUF_TOKEN }} lint: | diff --git a/examples/validate-push/buf-ci.yaml b/examples/validate-push/buf-ci.yaml index 4a7a175..6f8dcff 100644 --- a/examples/validate-push/buf-ci.yaml +++ b/examples/validate-push/buf-ci.yaml @@ -10,7 +10,7 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - - uses: bufbuild/buf-action@v0.3 + - uses: bufbuild/buf-action@v1 with: # The token paramater is required to authenticate with the Buf Schema Registry. token: ${{ secrets.BUF_TOKEN }} diff --git a/examples/version-env/buf-ci.yaml b/examples/version-env/buf-ci.yaml index 44a619c..494d832 100644 --- a/examples/version-env/buf-ci.yaml +++ b/examples/version-env/buf-ci.yaml @@ -11,7 +11,7 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - - uses: bufbuild/buf-action@v0.3 + - uses: bufbuild/buf-action@v1 with: setup_only: true - run: buf version diff --git a/examples/version-input/buf-ci.yaml b/examples/version-input/buf-ci.yaml index 4f340fe..b856475 100644 --- a/examples/version-input/buf-ci.yaml +++ b/examples/version-input/buf-ci.yaml @@ -9,7 +9,7 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - - uses: bufbuild/buf-action@v0.3 + - uses: bufbuild/buf-action@v1 with: setup_only: true version: 1.35.0 diff --git a/examples/version-latest/buf-ci.yaml b/examples/version-latest/buf-ci.yaml index f079ac0..ce8b724 100644 --- a/examples/version-latest/buf-ci.yaml +++ b/examples/version-latest/buf-ci.yaml @@ -9,7 +9,7 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - - uses: bufbuild/buf-action@v0.3 + - uses: bufbuild/buf-action@v1 with: setup_only: true - run: buf version diff --git a/package-lock.json b/package-lock.json index a75d593..b9c5993 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "buf-action", - "version": "0.3.0", + "version": "1.0.0", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "buf-action", - "version": "0.3.0", + "version": "1.0.0", "license": "Apache-2.0", "dependencies": { "@actions/core": "^1.10.1", diff --git a/package.json b/package.json index 401ee76..ea01a89 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "buf-action", - "version": "0.3.0", + "version": "1.0.0", "description": "GitHub Action for buf", "main": "src/main.ts", "scripts": {