Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add ignore_refs parameter #48

Closed
wants to merge 7 commits into from
Closed
Show file tree
Hide file tree
Changes from 6 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 27 additions & 1 deletion .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -393,4 +393,30 @@ jobs:
breaking: false
push: true # Push to re-create.
archive: true # Archive the pushed module.
comment: false
pr_comment: false
test-ignore-refs:
# Check the ignore_refs input doesn't build or login, but still installs buf.
runs-on: ubuntu-latest
needs:
- test-setup
steps:
- uses: actions/checkout@v4
- env:
BUF_USERNAME: ${{ secrets.BUF_USERNAME }}
run: |
mkdir -p foo/v1
printf "version: v2\nname: ${BUF_MODULE}\n" > buf.yaml
printf "NOT BUILDABLE" > foo/v1/bar.proto
- uses: ./
with:
username: ${{ secrets.BUF_USERNAME }}
token: ${{ secrets.BUF_TOKEN }}
ignore_refs: ${{ github.head_ref || github.ref_name }}
lint: false
format: false
breaking: false
push: false
archive: false
pr_comment: false
id: buf-action
- run: buf --version
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ Add these parameters under the `with` section of the `uses` step in the workflow
| `exclude_imports` | Exclude files imported by the target modules. | False |
| `exclude_paths` | Exclude specific files or directories, e.g. "proto/a/a.proto", "proto/a" (separated by newlines). | |
| `pr_comment` | Comment the results on the pull request. | Only on pull requests |
| `ignore_refs` | Ignore specific refs expressed as glob expressions, e.g. "main", "develope/*" (separated by newlines). | Ignores dependabot ("dependabot/*") |
emcfarlane marked this conversation as resolved.
Show resolved Hide resolved
| `format` | Whether to run the formatting step. | Runs on pushes to Git PR |
| `lint` | Whether to run the linting step. | Runs on pushes to Git PR |
| `breaking` | Whether to run the breaking change detection step. | Runs on pushes to Git PR |
Expand Down
10 changes: 10 additions & 0 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,16 @@ inputs:
Comment on the pull request with the results of each step.
required: false
default: ${{ github.event_name == 'pull_request' }}
ignore_refs:
description: |-
Ignore specific refs expressed as glob expressions (separated by newlines).
Example:
with:
ignore_refs: |
main
develop/*
required: false
default: "dependabot/*"

input:
description: |-
Expand Down
Loading
Loading