• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Learning GitHub Actions - When to build public actions

 
Ranch Hand
Posts: 69
1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Brent, welcome to the Ranch!

With GitHub Actions you can run shell commands from one of the standard runner environments to get some or all the automation you desire. You can also run public actions which can abstract some of the implementation details - perhaps better for sharing.

I'm wondering for your own development, when do you decide to implement a public action?

Cheers,
Greg
 
Author
Posts: 11
1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Greg, thanks for the question. I honestly haven't really had a need to implement a public action except for demonstration purposes. In my experience, using "reusable workflows" typically meets the needs better for code reuse if I'm just trying to isolate/not repeat a section of code. Reusable workflows require the ability to express the logic in a GitHub Actions workflow versus you having more freedom to code in some other form like Javascript for the action. So, creating a new action would be more suitable where I needed to implement the functionality with Javascript, Typescript, or a specialized environment like a Docker image. A public action is also a good choice if you're intending to provide functionality that you want to be more publicly accessible and consumable - similar to the notion of a Jenkins plugin. For example, many companies/products provide public actions that you can pull into your workflows to get the functionality of their products.  Public actions also allow for "branding" with icons, etc.  Hope this helps.
 
Greg Horie
Ranch Hand
Posts: 69
1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I didn't realize "reusable workflows" are an option. I'll have to do more reading on it.

For anyone reading this thread, more details can be found here - Reusing workflows.

Thanks Brent!
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic