'Reusable workflows with local actions

Reusable workflows with local actions are not working. Reusable workflow is trying to locate the local action in the main repo

Created sample repositories to reproduce the issue

  1. Repo with reusable workflows and local action - https://github.com/vinodsai-a/github-reusable-workflow-sample
  2. Sample repo which uses above reusable workflows - https://github.com/vinodsai-a/github-example-repo

This is the PR link -> https://github.com/vinodsai-a/github-example-repo/pull/1

Error -> https://github.com/vinodsai-a/github-example-repo/pull/1/checks

enter image description here



Solution 1:[1]

The issue here is that you can't call a local action on a repository without using the actions/checkout action to access the files in the repository.

on: [workflow_call]

jobs:
  local-action-testing:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/[email protected] # Necessary to access local action
      - uses: ./actions/local-action

I've got some proofs of concept here if you want to take a look:

Solution 2:[2]

I do not believe this is possible at this point in time. You may consider posting your query at https://github.community/c/code-to-cloud/52 to get better visibility to this request.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 GuiFalourd
Solution 2 aoggz