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

Merge pull request #14 from dtolnay/locked

Support `--locked` during install
This commit is contained in:
David Tolnay 2023-10-08 13:01:43 -04:00 committed by GitHub
commit c2765ec64a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 1 deletions

View file

@ -22,6 +22,10 @@ on:
required: false
type: string
default: stable
locked:
required: false
type: boolean
default: false
secrets:
private_key:
required: true
@ -44,7 +48,7 @@ jobs:
- uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{inputs.toolchain}}
- run: cargo install --force ${{inputs.git && format('--path={0}', inputs.path || '.') || inputs.crate}} --bin ${{inputs.bin || inputs.crate}}
- run: cargo install --force ${{inputs.git && format('--path={0}', inputs.path || '.') || inputs.crate}} --bin ${{inputs.bin || inputs.crate}} ${{inputs.locked && '--locked' || ''}}
working-directory: ${{inputs.git && inputs.crate || '.'}}
- id: which
run: echo "which=$(which ${{inputs.bin || inputs.crate}})" >> $GITHUB_OUTPUT

View file

@ -12,6 +12,7 @@ jobs:
with:
crate: taplo-cli
bin: taplo
locked: true
permissions:
contents: write
secrets: inherit