Skip to main content
Using Deno in production at your company? Earn free Deno merch.
Give us feedback
Module

x/actionify/src/job.ts>Job#continueOnError

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

Prevents a workflow run from failing when a job fails. Set to true to allow a workflow run to pass when this job fails.

Preventing a specific failing matrix job from failing a workflow

run

You can allow specific jobs in a job matrix to fail without failing the workflow run. For example, if you wanted to only allow an experimental job with node set to 15 to fail without failing the workflow run.

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

const ci = workflow({ name: 'ci', })
  .job('job', (job) => {
    return job
      .strategy({
        'fail-fast': false,
        matrix: {
          node: [16, 18],
          os: [Runner.MacOSLatest, Runner.UbuntuLatest],
          experimental: [false],
          include: [{ node: 17, os: Runner.UbuntuLatest, experimental: true }],
        },
      })
      .runsOn(ctx => e.expr(ctx.matrix.os))
      .continueOnError(ctx => e.expr(ctx.matrix.experimental))
  })

Parameters

continueOnError: WithContext<ExpressionValue, Base, "jobs:jobId:continueOnError">