pluralsh / plural-cli

cli for the plural platform
MIT License
27 stars 10 forks source link

plural-cli can't be setup from a GitHub action starting from v0.6.19 #413

Open NicolasGuary opened 1 year ago

NicolasGuary commented 1 year ago

Summary

Trying to run a GitHub action workflow to deploy to Plural. I'm using the following block in my action :

    - name: Login to Plural
      uses: pluralsh/setup-plural@v0.1.5
      with:
        config: ${{ secrets.PLURAL_CONFIG }}
        vsn: 0.6.19

Everything works fine if I don't specify vsn which defaults to v0.5.18or if I set vsn to 0.6.18

But starting from 0.6.19, setup-plural fails with the following error :

/usr/bin/chmod +x /opt/hostedtoolcache/plural/0.6.19/x64/plural
installed plural
wrote config file
/opt/hostedtoolcache/plural/0.6.19/x64/plural --help
/opt/hostedtoolcache/plural/0.6.19/x64/plural: error while loading shared libraries: libwebkit2gtk-4.0.so.37: cannot open shared object file: No such file or directory
Error: The process '/opt/hostedtoolcache/plural/0.6.19/x64/plural' failed with exit code 1[27](https://github.com/beamysoftware/data-pipelines/actions/runs/5143998884/jobs/9259723647#step:7:28)

I believe a dependency might be missing.

Reproduction

Run the following GitHub action :

name: Plural CLI fail 

on:
  push:
    branches:
      - "<your_test_branch>"

jobs:
  failing_job:
    environment:
      name: <your_env>
      url: <url>
    runs-on: ubuntu-latest
    permissions:
      contents: 'read'
      id-token: 'write'
    steps:
    - uses: actions/checkout@v3

    - name: Login to Plural
      uses: pluralsh/setup-plural@v0.1.5
      with:
        config: ${{ secrets.PLURAL_CONFIG }}
        vsn: 0.6.19

If vsn is 0.6.19 or above it will fail with the error described above :

/opt/hostedtoolcache/plural/0.6.19/x64/plural: error while loading shared libraries: libwebkit2gtk-4.0.so.37: cannot open shared object file: No such file or directory

Message from the maintainers:

Impacted by this bug? Give it a 👍. We factor engagement into prioritization.

snikch commented 1 year ago

We also hit this issue. Tried to install the missing dep with

 - name: Install libwebkit2gtk
       run: sudo apt-get install libwebkit2gtk-4.0-dev

But then we'd get (plural:3109): Gtk-WARNING **: 23:39:19.569: cannot open display:

floreks commented 1 year ago

The latest releases now contain a new asset plural-cli_console_0.6.24_Linux_amd64.tar.gz that does not have the embedded UI and does not require any additional dependencies.

@NicolasGuary @snikch try using this one in your GH actions instead.