Skip to content

Write your own GitHub JavaScript Action and automate customized tasks unique to your workflow.

License

Notifications You must be signed in to change notification settings

skills-dev/write-javascript-actions

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

78 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Write JavaScript Actions

Write your own GitHub JavaScript Action and automate customized tasks unique to your workflow.

Welcome

  • Who is this for: Developers, GitHub users, users new to Git, students, managers, and for teams.

  • What you'll learn: How to create custom JavaScript-based GitHub Actions, bundle them for distribution, and use them in workflows.

  • What you'll build: A Javascript based GitHub Action that fetches random dad jokes and exposes them as an output.

  • Prerequisites:

    • You should be familiar with GitHub and GitHub Actions. We recommend taking the Hello GitHub Actions exercise first.
  • How long: This exercise takes less than 1 hour to complete.

In this exercise, you will:

  1. Initialize a JavaScript project
  2. Create JavaScript source files for a Dad Jokes action
  3. Bundle your action into a distributable file
  4. Create action metadata with action.yml
  5. Author a workflow that uses your custom action
  6. Test your action by triggering it with issue comments

How to start this exercise

Simply copy the exercise to your account, then give your favorite Octocat (Mona) about 20 seconds to prepare the first lesson, then refresh the page.

Having trouble? 🤷

When copying the exercise, we recommend the following settings:

  • For owner, choose your personal account or an organization to host the repository.

  • We recommend creating a public repository, since private repositories will use Actions minutes.

If the exercise isn't ready in 20 seconds, please check the Actions tab.

  • Check to see if a job is running. Sometimes it simply takes a bit longer.

  • If the page shows a failed job, please submit an issue. Nice, you found a bug! 🐛


© 2025 GitHub • Code of ConductMIT License

About

Write your own GitHub JavaScript Action and automate customized tasks unique to your workflow.

Topics

Resources

License

Stars

Watchers

Forks