Create Reusable GitHub Actions Templates with Composite Actions v2

Поделиться
HTML-код
  • Опубликовано: 2 июн 2024
  • In this video I'm going to show you how to create reusable GitHub Actions templates using the GitHub Composite Actions, which now support also referencing other actions.
    You read it right, previously, actions written in YAML could only use scripts. Now, they can also reference other actions. This makes it easy to reduce duplication in your workflows.
    🌟EXCLUSIVE CONTENT🌟
    Do you want to access exclusive content, live chats and Q&As, polls, and even 1:1 calls with me? Join my Patreon: / coderdave
    🆘 NEED HELP? 🆘
    Book a 1:1 Consultation with CoderDave: geni.us/cdconsult
    🙏🏻SUPPORT THE CHANNEL🙏🏻
    Buy me a coffee: www.buymeacoffee.com/CoderDave
    PayPal me donation: paypal.me/dabenveg
    🎥VIDEOS
    ► Composite Run Steps Actions BASICS: • GitHub Actions - Compo...
    ► Learn GitHub Actions: • GitHub Actions Tutoria...
    ► Use GitHub like a PRO: • Use GitHub like a PRO!...
    💬JOIN THE COMMUNITY
    ► Discord: geni.us/cddiscord
    ► Newsletter: coderdave.io/newsletter
    ► Blog: dev.to/n3wt0n
    ► GitHub: github.com/n3wt0n
    ► Twitter: / davidebenvegnu
    ► Facebook: / coderdaveyt
    ⏲TIMESTAMPS
    0:00 Composite Actions Introduction
    1:31 Create Composite Actions
    5:31 Use Composite Actions in Other Workflows
    9:10 Final Considerations
    📄RESOURCES
    ► Repo with the Composite Action: github.com/n3wt0n/compositeac...
    ► Consumer: github.com/n3wt0n/ActionsTest...
    🎤PODCAST: geni.us/cdpodcast
    ❓QUESTIONS?
    Have a question about DevOps, Cloud, Coding, or Anything Else? Post in comments section of this video!
    🔴SUBSCRIBE to CoderDave here: ruclips.net/user/CoderDave?sub...
    _______________
    👕Get my MERCH: geni.us/cdmerch
    🔮TOOLS I USE
    ► Twingate - Connect to your Private Resources SECURELY: geni.us/twingate
    ► TubeBuddy - #1 RUclips channel Management tool (FREE): www.tubebuddy.com/CoderDave
    ► Moosend - Free Newsletter and Automation Platform: geni.us/moosend
    📸🖥️GEAR AND SOFTWARE
    ► Music - Epidemic Sound (Get 30 days free): epidemicsound.com/referral/zf...
    ► Editing - Adobe Premiere Pro: geni.us/AdobeVideo
    ► Gear I Use for RUclips: kit.co/CoderDave/gear-i-use-f...
    ► Gear I Use for Streaming: kit.co/CoderDave/gear-i-use-f...
    ► My Computer Setup: kit.co/CoderDave/main-compute...
    ► Full office setup: github.com/n3wt0n/work-from-h...
    Disclaimer:
    Some product links are affiliate links which means if you buy something I'll receive a small commission at no additional cost to you.
    As an Amazon Associate, I earn from qualifying purchases.
  • НаукаНаука

Комментарии • 14

  • @CoderDave
    @CoderDave  2 года назад

    ✨ Question of the day ✨: Do you have any use case for this feature?
    GET EXCLUSIVE CONTENT:
    Join my Patreon: www.patreon.com/CoderDave
    SUPPORT THE CHANNEL :
    Buy me a coffee: www.buymeacoffee.com/CoderDave
    PayPal me donation: paypal.me/dabenveg

  • @dwainbrowne
    @dwainbrowne 2 года назад +2

    Thank you this was very helpful!! much appreciate your effort. Keep up the amazing work.

    • @CoderDave
      @CoderDave  2 года назад +1

      Thanks for the feedback ☺️ and always happy to be helpful ☺️

  • @pabloe1802
    @pabloe1802 2 года назад

    Hello, is possible to use a python script located in the composite repository? What I'm trying to do is to create a composite template that will run some python logic, but the python file is in the composite repo

  • @DamienMalakay
    @DamienMalakay Год назад +1

    hey Dave! thanks for providing such helpful tips. I do have a question though, in minute 7:17 you are calling the composite action and you are passing the required arguments which are stored in secrets within Github but, how would you pass variables from another composite action into another one? for example let's say my username and password are stored in Hashi Corp Vault and I need to extract them from there and then pass them into the composite action "Build and Push Image"?? :) thanks

    • @CoderDave
      @CoderDave  Год назад

      Hey there. I think the best way is having an output parameter for the composite action, and use that as input parameter for the second one (in the caller workflow)

  • @greg_thomson
    @greg_thomson Год назад +2

    When putting your actions within another repo did you have to set up any additional permissions
    Using Org repos

    • @CoderDave
      @CoderDave  Год назад +2

      For public repos no, but if the repo is internal you need to setup the access to the repo in the settings to allow other repos to “use” the action from there

    • @marsul_
      @marsul_ Месяц назад

      thanks for the question and thanks for the answer.

  • @diegoumba560
    @diegoumba560 2 года назад +1

    Hi, you know if composite is available for organizations private repos with a paid account?

    • @CoderDave
      @CoderDave  2 года назад +1

      Hey. Composite actions are available for every kind of account. But currently the limitation is that your composite action has to be hosted in a public repo. If you look at the roadmap, however, soon you’ll be able to host them in internal repos as well

    • @JBBell
      @JBBell Год назад

      @@CoderDave This is incredibly annoying and, from what I can tell, completely undocumented.

    • @CoderDave
      @CoderDave  Год назад

      The Composite Actions from Internal repos feature is now available (since few months ago). But of course internal repos are available only on GitHub Enterprise so… 😕

    • @CoderDave
      @CoderDave  Год назад

      It’s “indirectly documented”… in the official docs they say “create a new public repository “ so I guess technically it’s there, but it’s not clear that is a limitation
      docs.github.com/en/actions/creating-actions/creating-a-composite-action#prerequisites