Reader small image

You're reading from  Mastering GitHub Actions

Product typeBook
Published inMar 2024
PublisherPackt
ISBN-139781805128625
Edition1st Edition
Concepts
Right arrow
Author (1)
Eric Chapman
Eric Chapman
author image
Eric Chapman

Eric Chapman holds the position of Senior Delivery and Engineering Manager at a leading retailer in home improvement and trade in Australia and New Zealand. He primarily oversees integration, encompassing platforms such as API Gateway, EventMesh, authorization systems, developer portals, and extract, transform and load (ETL) platforms. Eric leads a team with a broad range of responsibilities and skills, overseeing all business areas. Previously, Eric and his team were instrumental in designing and developing an in-house point-of-sale system. This singular application accommodated four countries' tax and auditing requirements, supported multiple payment processing gateways, and incorporated a range of unique market-leading features.
Read more about Eric Chapman

Right arrow

Creating a reusable build pipeline

In Chapter 2, we created a build pipeline for our web app named build-withcache.yml. We’re going to leverage that workflow, make some small adjustments to it, and hopefully be able to implement a reusable caching pipeline into the environment.

Marking a workflow as a reusable workflow

The syntax difference between a normal and reusable workflow is minor. Instead of being called through an event that would have occurred in the repository, it will be triggered exclusively by the workflow_call event from the perspective of reusable workflows.

You may have a workflow that looks similar to this:

name: Pull request linting workflow
on:
  pull_request:

It would look like the following when converted to a reusable workflow:

name: Pull request linting workflow
on:
  workflow_call:

The only change required was to change the event type from pull_request to workflow_call to prepare for it to be called a reusable workflow...

lock icon
The rest of the page is locked
Previous PageNext Page
You have been reading a chapter from
Mastering GitHub Actions
Published in: Mar 2024Publisher: PacktISBN-13: 9781805128625

Author (1)

author image
Eric Chapman

Eric Chapman holds the position of Senior Delivery and Engineering Manager at a leading retailer in home improvement and trade in Australia and New Zealand. He primarily oversees integration, encompassing platforms such as API Gateway, EventMesh, authorization systems, developer portals, and extract, transform and load (ETL) platforms. Eric leads a team with a broad range of responsibilities and skills, overseeing all business areas. Previously, Eric and his team were instrumental in designing and developing an in-house point-of-sale system. This singular application accommodated four countries' tax and auditing requirements, supported multiple payment processing gateways, and incorporated a range of unique market-leading features.
Read more about Eric Chapman