3
0
Fork 0
mirror of https://github.com/dtolnay/install.git synced 2024-11-26 01:49:32 +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 required: false
type: string type: string
default: stable default: stable
locked:
required: false
type: boolean
default: false
secrets: secrets:
private_key: private_key:
required: true required: true
@ -44,7 +48,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}} - 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 || '.'}} 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

View file

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