Skip to content

ENH - Modify testing action so that it checks out its own repository #28

Open
@gabalafou

Description

@gabalafou

If we want to be able to create a workflow in the JupyterLab repo that calls an action our repository for accessibility testing like so:

jobs:
  test-jupyterlab-accessibility:
    steps:
      uses: quansight-labs/jupyter-a11y-testing/.github/actions/accessibility-test-jupyterlab@main
      with:
        repo: ${{ github.repository }}
        ref: ${{ github.ref }}

then the testing action needs to know how to checkout the repo that it belongs to. I could hard-code it (as quansight-labs/jupyter-a11y-testing), but that makes it a bit more difficult to test the action via forking.

I thought the environment variable $GITHUB_ACTION_REPOSITORY would do the trick, but when I tested it out, it didn't work. First, I created a repo gabalafou/action-sandbox in which I put a simple action that just prints the environment variables. Then, I created another repo with a workflow that calls the action in the first repo. If you search the log of one of the workflow runs you'll see the following line

GITHUB_ACTION_REPOSITORY=

which I think means that the environment variable contains an empty string and not gabalafou/action-sandbox, the repo that the contains the action.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    • Status

      Backlog 🗃

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions