github-action icon indicating copy to clipboard operation
github-action copied to clipboard

Can't run `start` command with `*` wildcard

Open stefan-niedermann opened this issue 3 years ago • 1 comments

Hello there :wave: I am trying to run a small spring boot server with the start and wait-on commands, like

[...]
      - name: Cypress run
        uses: cypress-io/github-action@v2
        with:
          start: java -jar server.jar
          wait-on: 'http://localhost:8080'

This works pretty well.

Unfortunately I don't know the very exact name of the .jar file, because it contains some version information like server-1.2.3-SNAPSHOT.jar.

Therefore I tried to use a wildcard, as I am used to on my physical machine: java -jar server*.jar. This didn't work (Couldn't find the .jar file). I also tried java -jar $(find "*.jar") without success.

It seems like I can't use a usual command with wildcards, so:

  • Is there a way to achieve my goal?
  • Did I miss something?
  • Is this a bash or sh or what exactly leads to the different behavior of the start command compared to a default step with a run command?

stefan-niedermann avatar Mar 04 '22 07:03 stefan-niedermann

My current workaround is a predecessor step to rename the file utilizing mv with a * wildcard:

[...]
      - name: Rename jar file to strip version information
        run: mv server*.jar server.jar
      - name: Cypress run
        uses: cypress-io/github-action@v2
        with:
          start: java -jar server.jar
          wait-on: 'http://localhost:8080'

However the actual issue is still valid from my point of view and I would appreciate being able to start the server.jar directly with a * wildcard.

stefan-niedermann avatar Mar 07 '22 13:03 stefan-niedermann

@stefan-niedermann

It looks like you found a workaround for your issue. Can we close this?

MikeMcC399 avatar Nov 06 '23 15:11 MikeMcC399

The issue does not affect me personally anymore. If this matches your definition of "the issue vanished / is fixed" feel free to close 🙂

stefan-niedermann avatar Nov 06 '23 17:11 stefan-niedermann