Skip to content

Commit 095b326

Browse files
authored
Fix registry authentication (#4)
Fixes the Shipyard.rs registry authentication by explicitly setting the global credential provider to `cargo:token` instead of it being empty. It also adds running `cargo check` to the integration test as it will actually download the crates instead of just the index.
1 parent b9cc5d4 commit 095b326

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

.github/workflows/test.yml

+2-1
Original file line numberDiff line numberDiff line change
@@ -40,5 +40,6 @@ jobs:
4040
token: ${{ secrets.SHIPYARD_TOKEN }}
4141
toolchain: ${{ matrix.rust }}
4242

43-
- run: cargo init . --bin --name CI
43+
- run: cargo init . --bin --name ci
4444
- run: cargo add logging --registry ${{ matrix.registry }}
45+
- run: cargo check

action.yml

+1-3
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,5 @@ runs:
5050
- name: Set Cargo environment variables
5151
shell: bash
5252
run: |
53-
registry=$(tr '[:lower:]' '[:upper:]' <<< ${{ inputs.registry }})
5453
echo "CARGO_NET_GIT_FETCH_WITH_CLI=true" >> $GITHUB_ENV
55-
echo "CARGO_REGISTRIES_${registry}_TOKEN=${{ inputs.token }}" >> $GITHUB_ENV
56-
echo "CARGO_REGISTRIES_${registry}_CREDENTIAL_HELPER=cargo:token" >> $GITHUB_ENV
54+
echo "CARGO_REGISTRY_GLOBAL_CREDENTIAL_PROVIDERS=cargo:token" >> $GITHUB_ENV

0 commit comments

Comments
 (0)