mirror of
https://github.com/dtolnay/install.git
synced 2024-11-22 08:29:30 +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
|
uses: ./.github/workflows/build.yml
|
||||||
with:
|
with:
|
||||||
crate: buck2
|
crate: buck2
|
||||||
git: https://github.com/facebookincubator/buck2
|
git: facebookincubator/buck2
|
||||||
|
path: cli
|
||||||
permissions:
|
permissions:
|
||||||
contents: write
|
contents: write
|
||||||
secrets: inherit
|
secrets: inherit
|
||||||
|
|
14
.github/workflows/build.yml
vendored
14
.github/workflows/build.yml
vendored
|
@ -12,7 +12,10 @@ on:
|
||||||
git:
|
git:
|
||||||
required: false
|
required: false
|
||||||
type: string
|
type: string
|
||||||
branch:
|
ref:
|
||||||
|
required: false
|
||||||
|
type: string
|
||||||
|
path:
|
||||||
required: false
|
required: false
|
||||||
type: string
|
type: string
|
||||||
secrets:
|
secrets:
|
||||||
|
@ -28,8 +31,15 @@ jobs:
|
||||||
timeout-minutes: 45
|
timeout-minutes: 45
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- 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
|
- 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
|
- id: which
|
||||||
run: echo "which=$(which ${{inputs.bin || inputs.crate}})" >> $GITHUB_OUTPUT
|
run: echo "which=$(which ${{inputs.bin || inputs.crate}})" >> $GITHUB_OUTPUT
|
||||||
- id: version
|
- id: version
|
||||||
|
|
|
@ -10,8 +10,8 @@ jobs:
|
||||||
uses: ./.github/workflows/build.yml
|
uses: ./.github/workflows/build.yml
|
||||||
with:
|
with:
|
||||||
crate: rustup-toolchain-install-master
|
crate: rustup-toolchain-install-master
|
||||||
git: https://github.com/dtolnay-contrib/rustup-toolchain-install-master
|
git: dtolnay-contrib/rustup-toolchain-install-master
|
||||||
branch: nodefault
|
ref: nodefault
|
||||||
permissions:
|
permissions:
|
||||||
contents: write
|
contents: write
|
||||||
secrets: inherit
|
secrets: inherit
|
||||||
|
|
Loading…
Reference in a new issue