Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Always Runs Help #2

Open
deltreey opened this issue Jul 7, 2024 · 15 comments
Open

Always Runs Help #2

deltreey opened this issue Jul 7, 2024 · 15 comments

Comments

@deltreey
Copy link

deltreey commented Jul 7, 2024

This always seems to run --help no matter what args I pass.

@Ardesco
Copy link
Owner

Ardesco commented Jan 11, 2025

Can you link me to the job that is causing you problems so that i can look at your config

@deltreey
Copy link
Author

honestly, this was 6 months ago. I don't have the job handy. I will try setting it up again. It could've been user error. I will close this an re-open if it's still an issue.

@deltreey
Copy link
Author

Here's the action I was running. I checked your docker image and the CMD is set to run --help but I also see that your code here should override that. It doesn't seem to on my runners.

      - name: Build module
        uses: Ardesco/nasher4gh@v1
        with:
          args: "['pack' '-y']"

@deltreey deltreey reopened this Jan 19, 2025
@Ardesco
Copy link
Owner

Ardesco commented Jan 20, 2025

Can you try:

  - name: Build module
    uses: Ardesco/nasher4gh@v1
    with:
      args: "['pack', '-y']"

Looks like you are missing a comma to separate the args.

@deltreey
Copy link
Author

I tried it that way too. No luck. In fact, the reason the comma is not there is because of trying to make it work.

@Ardesco
Copy link
Owner

Ardesco commented Jan 24, 2025

Don't suppose you have a public job you could link to so I can see the full workflow file and the run?

Also is -y supported or does it need to be --yes? That might display help if it doesn't recognise -y, you could try:

  - name: Build module
    uses: Ardesco/nasher4gh@v1
    with:
      args: "['pack', '--yes']"

@deltreey
Copy link
Author

no change. Here's a screenshot

Image

@Ardesco
Copy link
Owner

Ardesco commented Jan 27, 2025

I'm at a loss, it seems to be working fine for me.

Image

Could you supply the entire workflow file, maybe you have something missing that I have in mine?

@deltreey
Copy link
Author

Sure. Of course, it fails before the last step here.

name: Run CI Build

on: push

jobs:
  ci_build:
    runs-on: ubuntu-latest
    name: NWN:EE CI Build
    steps:
      - name: Checkout
        uses: actions/checkout@v3
        with:
          submodules: true
      - name: Build module
        uses: Ardesco/nasher4gh@v1
        with:
          args: "['pack', '--yes']"
      - name: Upload Artifact
        run: |
          curl --user ${{secrets.CREDENTIALS}} --upload-file aayor.mod https://<my_gitea_server>/api/packages/eedevsln/generic/aayor-nwn/${{gitea.run_id}}/aayor.mod
          curl --user ${{secrets.CREDENTIALS}} -X DELETE https://<my_gitea_server>/api/packages/eedevsln/generic/aayor-nwn/latest/aayor.mod
          curl --user ${{secrets.CREDENTIALS}} --upload-file aayor.mod https://<my_gitea_server>/api/packages/eedevsln/generic/aayor-nwn/latest/aayor.mod          

@Ardesco
Copy link
Owner

Ardesco commented Mar 14, 2025

I've been going over this and can't see why it doesn't work for you, all I can think is that the submodules may be causing some issues.

For the checkout step has it managed to successfully check out your code and all your submodules?

The docker image the action uses can be used to compile your code locally as well, you could try a local compile to see if that works (just to see if the image is capable of compiling your code, or there is some issue with it).

docker run --rm -it -v <PathToYourModuleCode>:/github/workspace ghcr.io/ardesco/nasher4gh-images:latest compile

@deltreey
Copy link
Author

yes, check out runs fine. Your docker command runs fine locally, but not sure if that says much about the runner.

Image

@Ardesco
Copy link
Owner

Ardesco commented Mar 16, 2025

This is expecting to run the nasher command in the /github/workspace directory, if I'm reading this right it looks like you are checking out to /github/workspace/aayor-nwn (assumign the eedevsln directory has been mapped to /github/workspace).

That could be the issue if it's running the command in one directory higher than expected.

Could you try tweaking your checkout action to:

 - uses: actions/checkout@v3
        with:
          submodules: true
          sparse-checkout: 'eedevsln/aayor-nwn'
          sparse-checkout-cone-mode: false

@deltreey
Copy link
Author

eedevsln is the org, but I tried your settings. Adding these settings, or both, breaks checkout.

@Ardesco
Copy link
Owner

Ardesco commented Mar 20, 2025

If eedevsln is the org I'm wrong and those commands will absolutely not work :)

I am currently at a loss, I would love to see an ls of your /github/workspace to see what is there, I think it's not what nasher is expecting which is why it's showing the help.

@deltreey
Copy link
Author

The image it's using is catthehacker/ubuntu:act-22.04 from here https://github.com/catthehacker/docker_images

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants