Skip to content

Commit ab74d87

Browse files
authored
chore(ci): Only dry run a release, and only publish github pages, when ci workflow is triggered from main smithy-rs repository (#3663)
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 <!--- Why is this change required? What problem does it solve? --> <!--- If it fixes an open issue, please link to the issue here --> 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 <!--- Describe your changes in detail --> 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 <!--- Please describe in detail how you tested your changes --> <!--- Include details of your testing environment, and the tests you ran to --> <!--- see how your change affects other areas of the code, etc. --> n/a ## Checklist <!--- If a checkbox below is not applicable, then please DELETE it rather than leaving it unchecked --> - [ ] 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._ Signed-off-by: Joshua Potts <8704475+iamjpotts@users.noreply.github.com>
1 parent 59ad183 commit ab74d87

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

.github/workflows/dry-run-release-scheduled.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ on:
1414
jobs:
1515
smithy-rs-scheduled-dry-run-release:
1616
name: Scheduled dry-run release
17+
if: github.repository == 'smithy-lang/smithy-rs'
1718
uses: ./.github/workflows/release.yml
1819
with:
1920
commit_sha: main

.github/workflows/github-pages.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ concurrency:
1717

1818
jobs:
1919
build-and-deploy-docs:
20+
if: github.repository == 'smithy-lang/smithy-rs'
2021
runs-on: ubuntu-latest
2122
steps:
2223
- name: Checkout

0 commit comments

Comments
 (0)