Skip to content

Allow running the reusable workflow from the same branch #932

Closed
@TWiStErRob

Description

@TWiStErRob

Note: this repo is my best guess for the issue, as it seems workflow_call is not implemented in this org?! Please move it if it's not appropriate.

Describe the enhancement
Allow using the same branch for workflow_call.

Fully-qualified / cross-repo reusability is awesome, but the base case of reusing locally is missing. To develop/change a workflow_call I need to update all the usages to test it, imagine the same in programming and method calls 😒.

At the minimum please add this to https://docs.github.com/en/actions/learn-github-actions/reusing-workflows#limitations

Code snippet
Right now we have to use a specific ref (archive):

jobs:
  caller:
    uses: org/repo/.github/workflows/file.yml@ref

For development and stability, it would be best to allow non-qualified usage, for example:

uses: org/repo/.github/workflows/file.yml

at this point the workflow from the same branch would be used.

SO user makes a good argument here: https://stackoverflow.com/a/69676592/253468

This would only work if it's the same repo, so maybe it could be even simpler as

uses: ./.github/workflows/file.yml

or just

uses: file.yml

Additional information
https://stackoverflow.com/q/69532525/253468
https://stackoverflow.com/q/69500491/253468

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions