3
0
Fork 0
mirror of https://github.com/dtolnay/install.git synced 2025-01-31 15:11:22 +01:00

Merge pull request #19 from dtolnay/pin

Support building specific pinned version
This commit is contained in:
David Tolnay 2025-01-25 01:36:08 -08:00 committed by GitHub
commit 00df600439
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -6,6 +6,9 @@ on:
crate: crate:
required: true required: true
type: string type: string
version:
required: false
type: string
bin: bin:
required: false required: false
type: string type: string
@ -48,7 +51,7 @@ jobs:
- uses: dtolnay/rust-toolchain@master - uses: dtolnay/rust-toolchain@master
with: with:
toolchain: ${{inputs.toolchain}} toolchain: ${{inputs.toolchain}}
- run: cargo install --force ${{inputs.git && format('--path={0}', inputs.path || '.') || inputs.crate}} --bin ${{inputs.bin || inputs.crate}} ${{inputs.locked && '--locked' || ''}} - run: cargo install --force ${{inputs.git && format('--path={0}', inputs.path || '.') || inputs.crate}} ${{inputs.version && format('--version={0}', inputs.version) || ''}} --bin ${{inputs.bin || inputs.crate}} ${{inputs.locked && '--locked' || ''}}
working-directory: ${{inputs.git && 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