actions-rs / install

⏩ GitHub Action for a faster binary crates installation
https://github.com/marketplace/actions/rust-cargo-install
MIT License
54 stars 12 forks source link

Unable to access certificate file at runtime #2

Closed g-s-k closed 4 years ago

g-s-k commented 4 years ago

Do the checklist before filing an issue:

Description

When attempting to verify the downloaded binary, the action's code is unable to find the public key file (public.pem).

Workflow code

- uses: actions-rs/install@v0.1
    with:
      crate: cargo-web
      version: latest
      use-tool-cache: true

Action output

Run actions-rs/install@v0.1
Installing "cargo-web = latest"
Run actions-rs/install@v0.1
  with:
    crate: cargo-web
    version: latest
    use-tool-cache: true
    use-cache: true
Tool cache is explicitly enabled via the Action input
Downloading from the tool cache
  Newest cargo-web version available at crates.io: 0.6.26
  Downloading cargo-web signature into /home/runner/.cargo/bin/cargo-web.sig
  Downloading cargo-web == 0.6.26 into /home/runner/.cargo/bin/cargo-web
  Starting signature verification process
  /usr/bin/openssl dgst -sha256 -verify public.pem -signature /home/runner/.cargo/bin/cargo-web.sig /home/runner/.cargo/bin/cargo-web
  Can't open public.pem for reading, No such file or directory
  140636534547520:error:02001002:system library:fopen:No such file or directory:../crypto/bio/bss_file.c:69:fopen('public.pem','r')
  140636534547520:error:2006D080:BIO routines:BIO_new_file:no such file:../crypto/bio/bss_file.c:76:
  unable to load key file
  ##[warning]Unable to validate signature for downloaded cargo-web!
  ##[warning]Unable to download cargo-web == latest from the tool cache: Error: The process '/usr/bin/openssl' failed with exit code 1
Falling back to the `cargo install` command

Expected behavior

I expected the binary to be verified successfully and bypass rebuilding it on each CI run.

Additional context

I'd like to help with this issue, but am a little out of my depth since I'm new to Actions. I see the key file committed in the repository here, but i'm not sure how it would get copied over into the right spot at runtime. Thanks!

svartalf commented 4 years ago

Thank you for pointing that out, @g-s-k, this bug was fixed and released!

g-s-k commented 4 years ago

Thanks!