Skip to content

Actions

An action is a reusable task, with input & output parameters that automates a specific step in a workflow.

Usage

  • To use an external action, specify the owner & repository name in the uses section, with an optional (but recommended) version number
    - uses: actions/checkout@v4
    
  • To use an internal action, specify the path to the action
    - uses: ./.github/actions/path/to/my/action
      with:
        input1: "test"
        input2: "example"
    

Internal Actions

  • To create a local custom action, the filename must be action.yml or action.yaml1
  • It is recommended that they are stored within .github/actions
  • The core of the action looks like the following
    name: Custom Action
    description: Custom Description
    
    # Inputs (Optional)
    inputs:
      input1:
    
    # Outputs (Optional)
    outputs:
        output1:
    
    runs:
      using: "composite"
      steps: