0.0.1 • Published 8 months ago

@woodpecker-ci/plugin v0.0.1

Weekly downloads
-
License
-
Repository
-
Last release
8 months ago

ts-plugin

Utilities to create a Woodpecker-CI typescript / javascript plugin.

Creating plugin

import { runPlugin } from '@woodpecker-ci/plugin';

runPlugin({
  meta: {
    name: 'my-plugin',
    version: '1.0.0',
    description: 'My plugin description',
  },
  settings: {
    name: {
      type: 'string',
      description: 'Your name',
      required: true,
    },
    friendly: {
      type: 'boolean',
      description: 'Use friendly greeting',
    },
  },
  async run({ settings }) {
    console.log(`${settings.friendly ? 'Hi' : 'Greetings'} ${settings.name}!`);
  },
});

Use it in Woodpecker-CI

steps:
  - image: your-image
    name: my-plugin
    settings:
      name: John
      friendly: true
0.0.1

8 months ago