What is a reusable workflow, and how is it called?
BeginnerConceptCustom Actions & Reusable Workflows
Answer
A workflow with on: workflow_call, called as a job:
jobs:
deploy-dev:
uses: ./.github/workflows/deploy.yml # same repo
with:
environment: dev
image-digest: ${{ needs.build.outputs.digest }}
secrets: inherit
deploy-shared:
uses: devopsshack/platform-workflows/.github/workflows/deploy-eks.yml@v3 # another repo
A calling job can only contain uses, with, secrets, needs, if, strategy, permissions and concurrency, not runs-on or steps.
More on Custom Actions & Reusable Workflows
What are the three kinds of custom action and how do you choose?BeginnerWrite a minimal composite action that installs Node and dependencies with caching.IntermediateWhat can a composite action not do compared to a job?IntermediateHow do you pass outputs out of a composite action?IntermediateWhat does `action.yml` contain for a JavaScript action?IntermediateWhy must a JavaScript action commit its `dist/` or `node_modules`?Intermediate