Skip to content

github.action_repository and github.action_ref are empty in run for composite actions #49245

Answered by ChristopherHX
jsoref asked this question in Actions
Discussion options

You must be logged in to vote

Described in another way github.action_repository and github.action_ref are empty (broken) in expressions within the run step script definition of a composite action.

Using it in the env field of a run step will behave correctly.

The change between these commits triggered an actions/runner bug
https://github.com/check-spelling/check-spelling/compare/2bb4ea78df51ab5ded5612c08586e6ed59d1f032..50ca43769650975d2dee92e29fa9cbbe30d0247b#diff-1243c5424efaaa19bd8e813c5e6f6da46316e63761421b3e5f5c8ced9a36e6b6R472

E.g. this would work, otherwise wait for GitHub Support to fix actions/runner.

    - name: shim-path
      shell: bash
      run: |
        THIS_ACTION_PATH=$(perl -pe 's#/\./#/#g; s#//+#/…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@jsoref
Comment options

Answer selected by jsoref
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something isn't working correctly Actions Build, test, and automate your deployment pipeline with world-class CI/CD
2 participants