Skip to content

Javascript actions without checking in node_modules #100

@thomaseizinger

Description

@thomaseizinger

From the example actions like labeler, I get the impression that the idea is to check node_modules into VCS so that the runner can resolve the dependencies of the action at runtime.

Instead of doing that, I'd much rather use a tool like webpack to bundle everything up that is necessary and only check in the generated file.
However, it seems that "@actions/github" is not compatible with that approach. My action fails at runtime because it cannot import the event.json file: https://github.com/thomaseizinger/actions-playground/runs/207679280

For now, I resorted to not use the "@actions/" dependencies and code the requests myself since they are fairly trivial.

IMO, it would be good to have examples that use webpack and a zero-dependency JavaScript file for actions.
The project I am currently working on is here: https://github.com/thomaseizinger/assign-pr-creator-action

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions