leafo / gh-actions-lua

GitHub action for Lua/LuaJIT

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

how to run my lua file

ZAA03 opened this issue · comments

commented

The Full Example have a little problem.
And I use your github action,always show lua: cannot open **.lua: No such file or directory
like this

name: test 
   on: [push] 
   jobs: 
 test: 
 runs-on: ubuntu-latest 
   steps: 
   - uses: leafo/gh-actions-lua@v8 
 with: 
 luaVersion: "5.1.5" 
 #5.1.5 
   - uses: leafo/gh-actions-luarocks@v4 

 - name:  install package
 run: | 
 luarocks install luasocket 
 luarocks install dkjson 
 luarocks install md5 

 - name: print package version
 run: | 
 lua -e 'http = require ("socket.http") print(socket._VERSION)' 
 lua -e 'md5 = require "md5" print(md5._VERSION)' 

#---------------------------------------------------------------
   - name: Run 
 run: | 
         pwd 
         lua ./***.lua                            #←----  Error in here!!
#---------------------------------------------------------------

It will show lua: cannot open **.lua: No such file or directory
Run is error
How can I solve this problem?

How did you solve this?

commented

@Ismoh lua is added to the path so in order to run your lua file you just need to be sure you provide a correct path to a lua script, eg. lua myscript.lua

The issue opener had an issue because they didn't provide a correct path to a lua script, so the lua interpreter threw an error.

Ah, I didnt understand at first spot. I thought I was able to define a lua 'installation' in my workspace. I am using a custom build lua51.dll and would like to use it, instead of any of lua ftps ones.
Is this possible? Should I create a new issue?