'Interpolate the version of reusable workflow in Github Actions

Any to pass a variable (of sorts) for the version of a reusable workflow

For example ,if I have this workflow:

name: caller-workflow
on:
  pull_request:
  push:
    branches:
      - master
# 2
jobs:
  call-the-workflow:
    uses: action-foobar/action-testing/.github/workflows/called_workflow.yml@${{github.ref_name}}
    with:
      TRIGGER_EVENT : ${{ github.event_name }}

from the example above

`uses: action-foobar/action-testing/.github/workflows/called_workflow.yml@${{github.ref_name}}` using a `${{github.ref_name}}` 

instead of a pinned reference.

Would like to be able to call the reusable workflow, using a reference (Thereby I could do easy automation on pull requests or any branch (for pipeline or CI development)



Sources

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

Source: Stack Overflow

Solution Source