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

build: run buf action only on triggers from within the repo #1434

Merged
merged 3 commits into from
Sep 9, 2024

Conversation

bojand
Copy link
Member

@bojand bojand commented Sep 5, 2024

Substitute for #1425.

Currently the this action fails on PRs from forks due to aws-actions/configure-aws-credentials workflow which does not have access to secrets and vars in that context.

This PR makes the GH Action conditional to only run on PRs from within branches, along with push to master.
This should cover most cases since normally the Console team should be updating the protos.
Exceptions are docs updates by docs team, or external contributions. But we can work around those cases or offer manual fixes.

Copy link
Member

@andrewhsu andrewhsu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

suggested if: guard to have the step skipped if PR from forked repo, but allow the step to run after merge to master

.github/workflows/buf.yml Outdated Show resolved Hide resolved
Co-authored-by: Andrew Hsu <[email protected]>
Copy link
Member

@andrewhsu andrewhsu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i made suggestion, but in general LGTM

.github/workflows/buf.yml Show resolved Hide resolved
Copy link

github-actions bot commented Sep 9, 2024

The latest Buf updates on your PR. Results from workflow Buf CI / push-module (pull_request).

BuildFormatLintBreakingUpdated (UTC)
✅ passed✅ passed✅ passed✅ passedSep 9, 2024, 2:11 PM

@bojand bojand merged commit fcbd551 into master Sep 9, 2024
3 checks passed
@bojand bojand deleted the build/buf-action-if branch September 9, 2024 14:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants