I want to use reusable workflows and invoke two other actions, below is the snippet of both caller and called workflows:
az-dev-img-ops-reusable.yml (called workflow1)
on:
workflow_call:
inputs:
cloudProvider:
required: true
type: string
imgAction:
required: true
type: string
envName:
required: true
type: string
productImage:
required: true
type: string
jobs:
image-actions:
runs-on: self-hosted
steps:
- uses: actions/checkout@v2
- uses: ./.github/workflows/manage_images
with:
imgAction: ${{ inputs.imgAction }}
cloudProvider: ${{ inputs.cloudProvider }}
envName: ${{ inputs.envName }}
productImage: ${{ inputs.productImage }}
az-dev-tenant-ops-reusable.yml (called workflow2)
on:
workflow_call:
inputs:
cloudProvider:
required: true
type: string
envName:
required: true
type: string
action:
required: true
type: string
jobs:
tenant-actions:
runs-on: self-hosted
steps:
- uses: actions/checkout@v2
- uses: ./.github/workflows/refresh_tenant
with:
cloudProvider: azure
envName: az-dev
action: pod_refresh
az-dev-cicd.yml (caller workflow)
on:
workflow_dispatch:
jobs:
init:
runs-on: self-hosted
steps:
- uses: actions/checkout@v2
image-operations:
uses: ./.github/workflows/az-dev-img-ops-reusable.yml
with:
imgAction: check
cloudProvider: azure
envName: az-dev
productImage: my-server
tenant-operations:
needs: image-operations
uses: ./.github/workflows/az-dev-tenant-ops-reusable.yml
with:
cloudProvider: azure
envName: az-dev
action: pod_refresh
But while running, it throws error as below:
Can't find 'action.yml', 'action.yaml' or 'Dockerfile' under '/opt/my-runner/_work/my-images/my-images/.github/workflows/manage_images'. Did you forget to run actions/checkout before running your local action?
Checked over the web for solutions and tried all i.e.
- Have a actions/checkout.
- Make sure the caller function makes use of "uses" and not steps.
- Tried both absolute path of repo/yaml and relative path.
But haven't been able to resolve it. Any hints/help would be highly appreciated.