From c9bdaff04e9b64e6793a639a304e9711309d91d3 Mon Sep 17 00:00:00 2001 From: David Tolnay Date: Wed, 22 Jun 2022 10:27:53 -0700 Subject: [PATCH] Add support for git install --- .github/workflows/build.yml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 99e06fc..26c11de 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -9,6 +9,12 @@ on: bin: required: false type: string + git: + required: false + type: string + branch: + required: false + type: string secrets: private_key: required: true @@ -22,7 +28,7 @@ jobs: steps: - uses: actions/checkout@v3 - uses: dtolnay/rust-toolchain@stable - - run: cargo install --force ${{inputs.crate}} --bin ${{inputs.bin || inputs.crate}} + - 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) || ''}} - id: which run: echo "::set-output name=which::$(which ${{inputs.bin || inputs.crate}})" - id: version