Skip to content

Commit 950ee78

Browse files
ysaito1001Zelda Hessler
authored andcommitted
Allow "Update GitHub Pages" to opt-in to cargo sparse registry (#2610)
## Motivation and Context Addresses a CI failure within `Update GitHub Pages` due to the use of the cargo sparse registry ([example](https://github.com/awslabs/smithy-rs/actions/runs/4746548497/jobs/8430328515)). ## Description The PR allows the action to configure whether the cargo sparse registry is used via the environment variable [CARGO_UNSTABLE_SPARSE_REGISTRY](https://blog.rust-lang.org/2022/06/22/sparse-registry-testing.html#overview): <img width="800" alt="Screenshot 2023-04-20 at 11 55 06 AM" src="https://user-images.githubusercontent.com/15333866/233435686-d24ceb2f-facf-45c9-b6cb-490b8ea2b085.png"> ---- _By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice._ --------- Co-authored-by: Yuki Saito <awsaito@amazon.com> Co-authored-by: Zelda Hessler <zhessler@amazon.com>
1 parent f5fa409 commit 950ee78

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

.github/workflows/github-pages.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
on:
22
workflow_dispatch:
3+
inputs:
4+
opt-in-to-sparse-registry:
5+
description: Enable/disable CARGO_UNSTABLE_SPARSE_REGISTRY (https://blog.rust-lang.org/2022/06/22/sparse-registry-testing.html)
6+
required: true
7+
type: boolean
8+
default: false
39
push:
410
branches: [main]
511
paths:
@@ -24,6 +30,7 @@ jobs:
2430
- name: Generate docs
2531
env:
2632
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
33+
CARGO_UNSTABLE_SPARSE_REGISTRY: ${{ inputs.opt-in-to-sparse-registry }}
2734
run: |
2835
git config --local user.name "AWS SDK Rust Bot"
2936
git config --local user.email "aws-sdk-rust-primary@amazon.com"

0 commit comments

Comments
 (0)