mirror of
https://github.com/dtolnay/install.git
synced 2024-11-25 17:39:33 +01:00
Checkout and install from repo, instead of --git
This commit is contained in:
parent
6c41e2d294
commit
f850d6b745
3 changed files with 16 additions and 5 deletions
3
.github/workflows/buck2.yml
vendored
3
.github/workflows/buck2.yml
vendored
|
@ -10,7 +10,8 @@ jobs:
|
|||
uses: ./.github/workflows/build.yml
|
||||
with:
|
||||
crate: buck2
|
||||
git: https://github.com/facebookincubator/buck2
|
||||
git: facebookincubator/buck2
|
||||
path: cli
|
||||
permissions:
|
||||
contents: write
|
||||
secrets: inherit
|
||||
|
|
14
.github/workflows/build.yml
vendored
14
.github/workflows/build.yml
vendored
|
@ -12,7 +12,10 @@ on:
|
|||
git:
|
||||
required: false
|
||||
type: string
|
||||
branch:
|
||||
ref:
|
||||
required: false
|
||||
type: string
|
||||
path:
|
||||
required: false
|
||||
type: string
|
||||
secrets:
|
||||
|
@ -28,8 +31,15 @@ jobs:
|
|||
timeout-minutes: 45
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: actions/checkout@v3
|
||||
with:
|
||||
repository: ${{inputs.git}}
|
||||
ref: ${{inputs.ref}}
|
||||
path: ${{inputs.crate}}
|
||||
if: inputs.git
|
||||
- uses: dtolnay/rust-toolchain@stable
|
||||
- run: cargo install --force ${{inputs.crate}} --bin ${{inputs.bin || inputs.crate}} ${{inputs.git && format('--git={0}', inputs.git) || ''}} ${{inputs.branch && format('--branch={0}', inputs.branch) || ''}}
|
||||
- run: cargo install --force ${{inputs.git && format('--path={0}', inputs.path || '.') || inputs.crate}} --bin ${{inputs.bin || inputs.crate}}
|
||||
working-directory: ${{inputs.git && inputs.crate || '.'}}
|
||||
- id: which
|
||||
run: echo "which=$(which ${{inputs.bin || inputs.crate}})" >> $GITHUB_OUTPUT
|
||||
- id: version
|
||||
|
|
|
@ -10,8 +10,8 @@ jobs:
|
|||
uses: ./.github/workflows/build.yml
|
||||
with:
|
||||
crate: rustup-toolchain-install-master
|
||||
git: https://github.com/dtolnay-contrib/rustup-toolchain-install-master
|
||||
branch: nodefault
|
||||
git: dtolnay-contrib/rustup-toolchain-install-master
|
||||
ref: nodefault
|
||||
permissions:
|
||||
contents: write
|
||||
secrets: inherit
|
||||
|
|
Loading…
Reference in a new issue