Latest Threat Research:SANDWORM_MODE: Shai-Hulud-Style npm Worm Hijacks CI Workflows and Poisons AI Toolchains.Details
Socket
Book a DemoInstallSign in
Socket

@form8ion/github-workflows-core

Package Overview
Dependencies
Maintainers
2
Versions
20
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@form8ion/github-workflows-core

core functionality for form8ion plugins that manage github workflows

Source
npmnpm
Version
5.3.0
Version published
Weekly downloads
310
-46.09%
Maintainers
2
Weekly downloads
 
Created
Source

github-workflows-core

core functionality for form8ion plugins that manage github workflows

Node CI Workflow Status Codecov SLSA Level 2

Table of Contents

Usage

MIT license npm Try @form8ion/github-workflows-core on RunKit node

Installation

$ npm install @form8ion/github-workflows-core --save-prod

Example

Import

import {
  scaffoldCheckoutStep,
  scaffoldNodeSetupStep,
  scaffoldDependencyInstallationStep,
  scaffoldVerificationStep,
  loadWorkflowFile,
  writeWorkflowFile,
  workflowFileExists
} from '@form8ion/github-workflows-core';

Execute

const projectRoot = process.cwd();

(async () => {
  scaffoldCheckoutStep();

  scaffoldNodeSetupStep({versionDeterminedBy: 'nvmrc'});

  scaffoldDependencyInstallationStep();

  scaffoldVerificationStep();

  if (await workflowFileExists({projectRoot, name: 'existing-workflow-name'})) {
    await loadWorkflowFile({projectRoot, name: 'existing-workflow-name'});
  }

  await writeWorkflowFile({projectRoot, name: 'workflow-name', config: {}});
})();

API

scaffoldCheckoutStep

Scaffolder to define the details for a step to check out the project in a GitHub workflow

scaffoldNodeSetupStep

Scaffolder to define the details for a step to set up a node.js environment in a GitHub workflow

Takes a single options object as an argument, containing:

versionDeterminedBy string (required)

Source of node version for use in the configured step. Valid options are nvmrc or matrix

scaffoldDependencyInstallationStep

Scaffolder to define the details for a step to install dependencies in a GitHub workflow

scaffoldVerificationStep

Scaffolder to define the details for a step to execute verification

Contributing

PRs Welcome Commitizen friendly Conventional Commits semantic-release: angular Renovate

Dependencies

$ nvm install
$ npm install

Verification

$ npm test

FAQs

Package last updated on 26 Aug 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts