Skip to main content
Module

x/actionify/mod.ts>Workflow#env

Create and manage your GitHub workflows with TypeScript and Deno.
Latest
method Workflow.prototype.env
import { Workflow } from "https://deno.land/x/actionify@0.3.0/mod.ts";

A map of environment variables that are available to the steps of all jobs in the workflow. You can also set environment variables that are only available to the steps of a single job or to a single step. For more information, see jobs.<job_id>.env and jobs.<job_id>.steps[*].env.

Variables in the env map cannot be defined in terms of other variables in the map.

When more than one environment variable is defined with the same name, GitHub uses the most specific environment variable. For example, an environment variable defined in a step will override job and workflow variables with the same name, while the step executes. A variable defined for a job will override a workflow variable with the same name, while the job executes.

import { workflow } from 'https://deno.land/x/actionify@0.3.0/mod.ts';

const ci = workflow({ name: 'ci' })
  .on('push')
  .env({ SERVER: 'production' });

Type Parameters

Env extends EnvProps

Parameters

env: WithContext<Env, Base, "env">

Returns

Workflow<CombineAsUnion<Base | { env: StringKeyOf<Env>; }>>