Skip to content

About

JavaScript Action With ES Modules, a development utility designed to build, bundle, and execute JavaScript actions using modern ECMAScript modules. It provides a seamless user experience to help developers write modular code, streamline automation workflows, and integrate reusable functions efficiently.

Topics

Resources

Code of conduct

Contributing

Security policy

Stars

1 star

Watchers

0 watching

Forks

Repository files navigation

⚡ JavaScript Action with ES Modules

⚡ JavaScript Action with ES Modules is the complete English-language guide to building modern custom GitHub Actions in JavaScript using native ES Modules. Learn how to structure action.yml, use node20 runtime, import local and npm modules, bundle with esbuild, handle inputs and outputs, and test your action in real workflows. Built for DevOps engineers, maintainers, and developers who want to ship CI tooling the right way. Completely free. No signup. No paywall. No hidden chapters.

images (28)

🎯 Why This Guide Is Unique

Most GitHub Actions tutorials still use CommonJS with require() and old node16. This guide is fully modern — pure ES Modules, node20 runtime, import / export, and esbuild-based bundling. Every snippet is tested on real GitHub workflows.

deepseek_svg_20261019_b3dfa6 deepseek_svg_20261019_2f3d0b deepseek_svg_20261019_b029b2

🚀 Quick Start Guide

Step Action Time
1 Scaffold the action repo ~3 min
2 Add action.yml ~5 min
3 Write main.mjs ~10 min
4 Bundle with esbuild ~5 min
5 Test in a workflow ~10 min
6 Publish the action ~5 min

💡 Tip: Always commit the bundled dist/index.mjs — GitHub Actions runs the bundle, not your source.


🎁 What You Get

Feature Description Status
🧩 action.yml Modern metadata ✅ Active
⚡ node20 Runtime Latest supported ✅ Active
📦 ES Modules import / export ✅ Active
🔨 esbuild Bundle Single file output ✅ Active
🎛️ Inputs + Outputs @actions/core ✅ Active
🧪 Test Workflow Real CI run ✅ Active
deepseek_svg_20261019_b3dfa6 deepseek_svg_20261019_2f3d0b deepseek_svg_20261019_b029b2

❓ What Is a JavaScript Action

Term Description
Action Reusable CI step
action.yml Metadata file
node20 Supported runtime
ESM ES Modules
esbuild Fast bundler
@actions/core Inputs/outputs API

Why use it?

  • ✅ Reusable across repos
  • ✅ Modern ES Modules
  • ✅ No Docker needed
  • ✅ Runs on any runner
  • ✅ Free guide

🔍 Action Types

Type Description Best For
JS Action Node.js code Most cases
Composite YAML steps Simple glue
Docker Container Heavy deps
Reusable WF Full workflow Orchestration
ES Modules import/export Modern JS
CommonJS Legacy Older setups

📊 Before vs After

Feature Before After
Runtime node16 ✅ node20
Modules CommonJS ✅ ESM
Bundle ncc ✅ esbuild
Source One file ✅ Modules
Testing Manual ✅ Real CI
Price Paid courses ✅ Free guide

🌍 Supported Platforms

Platform Status Notes
GitHub Actions ✅ Supported All runners
Ubuntu Runner ✅ Supported Best support
Windows Runner ✅ Supported Native
macOS Runner ✅ Supported Native
Self-Hosted ✅ Supported Any
Local act ✅ Supported Local test

📦 Package Contents

Component Description Format
Setup Guide Project + files MD
action.yml Guide Metadata fields MD
ESM Guide import/export MD
Bundle Guide esbuild config MD
Inputs Guide @actions/core MD
Test Guide Real workflow MD

📋 System Requirements

Component Minimum Recommended
OS Any modern OS Latest
CPU Dual-core 1.8 GHz Quad-core 3.0 GHz+
RAM 2 GB 8 GB
Storage 200 MB 1 GB
Node 18+ 20+
Git 2.30+ Latest

🔧 Setup Walkthrough

Step 1 — Scaffold

Create the repo and src/ folder.

Step 2 — action.yml

Set runs.using: node20 and main: dist/index.mjs.

Step 3 — main.mjs

Write the entry with import.

Step 4 — Bundle

Run esbuild to output dist/index.mjs.

Step 5 — Test

Add a test workflow to .github/workflows/.

Step 6 — Publish

Tag a release and use uses: you/action@v1.


🌐 How To Use

First Action

  1. Scaffold the repo
  2. Configure action.yml
  3. Write main.mjs
  4. Bundle with esbuild
  5. Test in a workflow
  6. Publish

User Tips

  • ✅ Commit dist/
  • ✅ Use node20
  • ✅ Validate inputs
  • ✅ Log with core.info
  • ✅ Tag releases

💡 Best Tips

  • ✅ Prefer esbuild over ncc
  • ✅ Keep source modular
  • ✅ Add tests
  • ✅ Document inputs
  • ✅ Version tags

🔧 Troubleshooting

Problem Solution
"Cannot find module" Commit dist/
Wrong runtime Set node20
Inputs empty Check with:
Bundling fails Add esbuild config
Action not found Tag release
Permission error Check permissions:

❓ FAQ

Is this guide free? Yes — completely free to read.
Does it use ES Modules? Yes — pure `import`/`export`.
Is node20 supported? Yes — this is the modern runtime.
Do I need Docker? No — JS actions don't require it.
How do I bundle? esbuild is covered in full.
Can I test locally? Yes — with `act`.
Does it cover publishing? Yes — tag + release guide.
Is it beginner-friendly? Yes — starts from scaffold.

⚠️ Terms of Use

✅ Allowed ❌ Forbidden
Personal use Selling the guide
Commercial CI Redistributing as paid
Team onboarding Removing author credits
Educational use Bundling with malware

🏁 Conclusion

JavaScript Action with ES Modules is the complete guide to modern GitHub Actions:

  • ✅ node20 runtime
  • ✅ ES Modules
  • ✅ esbuild bundling
  • ✅ Inputs + outputs
  • ✅ Real workflow tests
  • ✅ Completely free

Ship modern actions — open the guide today.


🔍 SEO Keywords and Tags

Primary Keywords

  • JavaScript Action GitHub
  • ES Modules GitHub Actions
  • node20 GitHub Action
  • Custom Action Guide
  • GitHub Action esbuild

Secondary Keywords

  • GitHub Actions 2026
  • action.yml node20
  • ESM GitHub Action
  • Bundle Action esbuild
  • Actions Inputs Outputs

Long-Tail Keywords

  • How to build a JavaScript GitHub Action
  • Use ES Modules in GitHub Actions
  • Bundle a Node20 action with esbuild
  • Publish a custom GitHub Action
  • Test a JavaScript action in CI
  • action.yml node20 main.mjs example

Tags

GitHubActions, JavaScript, ESM, node20, CI, Free Guide, 2026

SEO Description

JavaScript Action with ES Modules — free guide to node20, ESM, esbuild bundling, and publishing. Build modern custom GitHub Actions. Open now!

About

JavaScript Action With ES Modules, a development utility designed to build, bundle, and execute JavaScript actions using modern ECMAScript modules. It provides a seamless user experience to help developers write modular code, streamline automation workflows, and integrate reusable functions efficiently.

Topics

Resources

Code of conduct

Contributing

Security policy

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages