Skip to content

Commit b9cc5d4

Browse files
authored
Switch to stabilized cargo registry auth (#3)
Switches to the recently stabilized [registry auth](https://doc.rust-lang.org/cargo/reference/registry-authentication.html) for providing credentials to Shipyard instead of the `User-Agent` header.
1 parent 310c33b commit b9cc5d4

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

action.yml

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

0 commit comments

Comments
 (0)