Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Actions: Reusable workflows on GHES (Beta) #257

Open
github-product-roadmap opened this issue Oct 8, 2021 · 0 comments
Open

Actions: Reusable workflows on GHES (Beta) #257

github-product-roadmap opened this issue Oct 8, 2021 · 0 comments

Comments

@github-product-roadmap
Copy link
Collaborator

@github-product-roadmap github-product-roadmap commented Oct 8, 2021

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.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
GitHub public roadmap
Q1 2022 – Jan-Mar
Status: Q1 2022 – Jan-Mar
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
1 participant