-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Description
Summary
This feature enables you to reuse an entire workflow as if it were an action. Instead of copying and pasting workflow definitions across repositories, you can reference an existing workflow with a single line of configuration.
Intended Outcome
Use this feature to create a library of reusable workflows. This will DRY your workflow configuration, and make it easier for everyone on your team to get started with Actions.
How will it work?
To reuse a workflow, ensure it listens to a new workflow_call event trigger, and then reference it with the familiar uses syntax. Optionally, use inputs and outputs to pass data between them, just like with actions.
For example:
name: Build & Release App
on:
push:
jobs:
build:
uses: example-org/automation/workflows/build.yml@1
release:
needs: build
uses: example-org/automation/workflows/release.yml@1
with:
artifact-url: jobs.build.outputs.artifact-url
Reusable workflows which are defined in internal repositories can be used by workflows in any repository within the same Enterprise.
Metadata
Metadata
Assignees
Labels
Type
Projects
Status