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

Support --locked during install

This commit is contained in:
David Tolnay 2023-10-08 10:01:23 -07:00
parent e7ebb97ed1
commit 01f65ed591
No known key found for this signature in database
GPG key ID: F9BA143B95FF6D82
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