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

chore(ci): Only dry run a release, and only publish github pages, when ci workflow is triggered from main smithy-rs repository #3663

Merged
merged 1 commit into from
May 24, 2024

Conversation

iamjpotts
Copy link
Contributor

Similar to #3597.

Only run these two workflows when they are triggered from the smithy-lang/smithy-rs repository, not from any fork.

Motivation and Context

The scheduled dry run fails daily in forks, failing each time, triggering alerts to the owner of the fork repository.

The github pages publishing workflow does not run regularly in forks, but does run when a fork is synced. It would be undesirable for an arbitrary fork to publish.

Description

On each of the two github workflows, add an if condition testing the repository owner and name. Only run if it matches the official repository, and is not a fork.

Testing

n/a

Checklist

  • I have updated CHANGELOG.next.toml if I made changes to the smithy-rs codegen or runtime crates
  • I have updated CHANGELOG.next.toml if I made changes to the AWS SDK, generated SDK code, or SDK runtime crates

n/a in both cases

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

…n ci workflow is triggered from main smithy-rs repository

Signed-off-by: Joshua Potts <8704475+iamjpotts@users.noreply.github.com>
@iamjpotts iamjpotts requested review from a team as code owners May 24, 2024 00:52
Copy link
Contributor

@ysaito1001 ysaito1001 left a comment

Choose a reason for hiding this comment

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

The scheduled dry run fails daily in forks, failing each time, triggering alerts to the owner of the fork repository.

I can imagine how annoying. Thanks for noticing it and submitting the fix!

@ysaito1001 ysaito1001 added this pull request to the merge queue May 24, 2024
Merged via the queue into smithy-lang:main with commit ab74d87 May 24, 2024
41 of 42 checks passed
@iamjpotts iamjpotts deleted the 20240523-release-ci-no-forks branch May 24, 2024 17:20
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.

2 participants