custom-gha-cli
TypeScript icon, indicating that this package has built-in type declarations

0.1.1 • Public • Published

custom-gha-cli

A CLI for creating custom github actions:

  • Docker
  • Javascript
  • Composite

Usage

Use the init command to initialize dependencies for a new action.

The init command installs dependencies, sets up folder structure, configures action.yaml, necessary files.

npx custom-gha-cli init

Folder Structure

TypeScript Action:

action-name
├── action.yaml
├── node_modules
│   ├── @types
│   ├── @vercel
│   ├── typescript
│   └── undici-types
├── package-lock.json
├── package.json
├── src
│   └── action-name.ts
└── tsconfig.json

JavaScript Action:

action-name
├── action.yaml
├── node_modules
│   ├── @types
│   ├── @vercel
│   ├── typescript
│   └── undici-types
├── package-lock.json
├── package.json
└── src
    └── action-name.js

action.yaml

name: action
description: action

runs:
  using: 'node16'
  main: 'dist/index.js'

Docker Action:

container-action
├── Dockerfile
└── action.yaml

action.yaml

name: container-action
description: container-action

runs:
  using: 'docker'
  main: 'Dockerfile'
  args:

Composite Action:

composite-action
└── action.yaml

action.yaml

name: 'container-action'
description: 'container-action'

runs:
  using: "composite"
  steps:
    - name: Set Greeting
      run: echo "Hello custom github action"
      shell: bash
      env:

Example

Readme

Keywords

Package Sidebar

Install

npm i custom-gha-cli

Weekly Downloads

1

Version

0.1.1

License

MIT

Unpacked Size

80.2 kB

Total Files

8

Last publish

Collaborators

  • trial-pyth-gh