-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
f2b81c9
commit 19293f8
Showing
3 changed files
with
48 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
name: checkout | ||
description: "Checks out repo with optional token" | ||
inputs: | ||
token: | ||
description: "Access token for private repos" | ||
required: false | ||
|
||
runs: | ||
using: "composite" | ||
steps: | ||
- uses: actions/checkout@v3 | ||
if: "${{ inputs.token != null }}" | ||
with: | ||
token: ${{ secrets.CI_READ }} | ||
submodules: recursive | ||
- uses: actions/checkout@v3 | ||
if: "${{ inputs.token == null }}" | ||
with: | ||
submodules: recursive |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,12 @@ | ||
name: rust-toolchain | ||
description: "Sets up a standard rust toolchain" | ||
inputs: | ||
toolchain: | ||
description: "Which rust toolchain to use" | ||
required: false | ||
token: | ||
description: "Access token for private repos" | ||
required: false | ||
|
||
runs: | ||
using: "composite" | ||
|
@@ -23,3 +27,9 @@ runs: | |
- uses: Swatinem/[email protected] | ||
with: | ||
shared-key: ${{ steps.get-toolchain.outputs.toolchain }} | ||
- run: git config --global url."https://x-access-token:${{ inputs.token }}@github.com/".insteadOf "https://github.com/" | ||
if: ${{ inputs.token != null }} | ||
shell: bash | ||
- run: git config --global url."https://${{ inputs.token }}@github.com/".insteadOf "[email protected]:" | ||
if: ${{ inputs.token != null }} | ||
shell: bash |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters