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

x/actionify/src/step.ts>Step#uses

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

Selects an action to run as part of a step in your job. An action is a reusable unit of code. You can use an action defined in the same repository as the workflow, a public repository, or in a published Docker container image.

We strongly recommend that you include the version of the action you are using by specifying a Git ref, SHA, or Docker tag. If you don't specify a version, it could break your workflows or cause unexpected behavior when the action owner publishes an update.

Using the commit SHA of a released action version is the safest for stability and security. If the action publishes major version tags, you should expect to receive critical fixes and security patches while still retaining compatibility. Note that this behavior is at the discretion of the action's author. Using the default branch of an action may be convenient, but if someone releases a new major version with a breaking change, your workflow could break. Some actions require inputs that you must set using the with keyword. Review the action's README file to determine the inputs required.

Actions are either JavaScript files or Docker containers. If the action you're using is a Docker container you must run the job in a Linux environment. For more details, see runs-on.

Using versioned actions
import { Job } from 'https://deno.land/x/actionify@0.3.0/mod.ts';

const job = Job
  .create()
  // Reference a specific commit
  .step(step => step.uses('actions/checkout@a81bbbf8298c0fa03ea29cdc473d45769f953675'))
  // Reference the major version of a release
  .step(step => step.uses('actions/checkout@v3'))
  // Reference a specific version
  .step(step => step.uses('actions/checkout@v3.2.0'))
  // Reference a branch
  .step(step => step.uses('actions/checkout@main'))

Parameters

uses: string