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

Remove 'crate' input from revs that already have a crate specified

This commit is contained in:
David Tolnay 2024-04-14 10:08:49 -07:00
parent 5608aafdb5
commit 2118353b98
No known key found for this signature in database
GPG key ID: F9BA143B95FF6D82

View file

@ -11,22 +11,28 @@ inputs:
runs: runs:
using: composite using: composite
steps: steps:
- name: Check inputs
run: |
echo "crate=${{inputs.crate}}" >> $GITHUB_OUTPUT
echo "bin=${{inputs.bin || inputs.crate}}" >> $GITHUB_OUTPUT
shell: bash
id: inputs
- name: Determine cargo bin directory - name: Determine cargo bin directory
run: echo "dir=$(dirname $(which cargo))" >> $GITHUB_OUTPUT run: echo "dir=$(dirname $(which cargo))" >> $GITHUB_OUTPUT
shell: bash shell: bash
id: cargo id: cargo
- name: Download ${{inputs.bin || inputs.crate}} - name: Download ${{steps.inputs.outputs.bin}}
run: curl --output ${{steps.cargo.outputs.dir}}/${{inputs.bin || inputs.crate}} https://github.com/dtolnay/install/releases/download/${{inputs.crate}}/${{inputs.bin || inputs.crate}} --location --silent --show-error --fail --retry 5 run: curl --output ${{steps.cargo.outputs.dir}}/${{steps.inputs.outputs.bin}} https://github.com/dtolnay/install/releases/download/${{steps.inputs.outputs.crate}}/${{steps.inputs.outputs.bin}} --location --silent --show-error --fail --retry 5
shell: bash shell: bash
- name: Download ${{inputs.bin || inputs.crate}}.sig - name: Download ${{steps.inputs.outputs.bin}}.sig
run: curl --output ${{runner.temp}}/${{inputs.bin || inputs.crate}}.sig https://github.com/dtolnay/install/releases/download/${{inputs.crate}}/${{inputs.bin || inputs.crate}}.sig --location --silent --show-error --fail --retry 5 run: curl --output ${{runner.temp}}/${{steps.inputs.outputs.bin}}.sig https://github.com/dtolnay/install/releases/download/${{steps.inputs.outputs.crate}}/${{steps.inputs.outputs.bin}}.sig --location --silent --show-error --fail --retry 5
shell: bash shell: bash
- name: Retrieve public key of signing key - name: Retrieve public key of signing key
run: gpg --output ${{runner.temp}}/signing-key.gpg --yes --dearmor ${{github.action_path}}/signing-key.asc run: gpg --output ${{runner.temp}}/signing-key.gpg --yes --dearmor ${{github.action_path}}/signing-key.asc
shell: bash shell: bash
- name: Verify gpg signature - name: Verify gpg signature
run: gpg --no-default-keyring --keyring ${{runner.temp}}/signing-key.gpg --trusted-key 830334D6A6010C41 --verify ${{runner.temp}}/${{inputs.bin || inputs.crate}}.sig ${{steps.cargo.outputs.dir}}/${{inputs.bin || inputs.crate}} run: gpg --no-default-keyring --keyring ${{runner.temp}}/signing-key.gpg --trusted-key 830334D6A6010C41 --verify ${{runner.temp}}/${{steps.inputs.outputs.bin}}.sig ${{steps.cargo.outputs.dir}}/${{steps.inputs.outputs.bin}}
shell: bash shell: bash
- name: Set executable bit - name: Set executable bit
run: chmod +x ${{steps.cargo.outputs.dir}}/${{inputs.bin || inputs.crate}} run: chmod +x ${{steps.cargo.outputs.dir}}/${{steps.inputs.outputs.bin}}
shell: bash shell: bash