Help
cancel
Showing results for 
Search instead for 
Did you mean: 
Copilot Lvl 3
Message 1 of 5

Create action using anything but JavaScript/TypeScript?

Solved! Go to Solution.

Hello,

 

It's possible to create an action using anything but JavaScript/TypeScript? Like for eg: PowerShell/Python or c#/Java?

4 Replies
Highlighted
Solution
Pilot Lvl 1
Message 2 of 5

Re: Create action using anything but JavaScript/TypeScript?

The only options right now are Docker container actions or Javascript/Typescript. What you can do though, is use the `@actions/exec` package of `actions/toolkit` and execute tools and scripts in other languages.

https://github.com/actions/toolkit/tree/master/packages/exec

 

I've made a template for a Python action using this method.

https://github.com/peter-evans/python-action

Highlighted
Pilot Lvl 1
Message 3 of 5

Re: Create action using anything but JavaScript/TypeScript?

Unfortunately, such docker based actions only work on Linux, so if you're doing builds on Mac or Windows for any reason, then they're useless.  

 

I too would really like an alternative language for actions that also works on Windows or Mac.

Highlighted
Pilot Lvl 1
Message 4 of 5

Re: Create action using anything but JavaScript/TypeScript?

Exactly. That was one of the main reasons why I made the Python action template based on the method I described. It's currently the only way to make it multi-platform.

 

I reached out to GitHub support about the situation. They couldn't tell me if there are other languages other than Javascript in the works, but what they did say is "We have no plans to support Windows or Mac Docker containers."

 

I think they will bring out other action runners at some point. Perhaps when Actions and the Javascript `actions/toolkit` has matured a little more.

Highlighted
Pilot Lvl 1
Message 5 of 5

Re: Create action using anything but JavaScript/TypeScript?

Ah, I see, I misunderstood the thrust of your comment.  I will take a look at this template, it sounds promising.