Passing github.repository as arg?

Trying to set up a simple action (my first one) that uses the value of github.repository (so, e.g., user/repo). In my action.yaml I’ve tried passing as follows:

  using: 'docker'
  image: 'Dockerfile'
    - ${{ env.GITHUB_REPOSITORY }}

and also ${{ github.repository }} as the last line but both don’t work. I assume I haven’t understood contexts well enough yet. Could anyone please explain how to do this?

So the environment variable can obviously be used directly within and doesn not have to be passed as arg at all. :crazy_face:

Hence in something like echo $GITHUB_REPOSITORY will print user/repo.

1 Like