Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
gabalafou opened this issue Nov 7, 2022 · 0 comments
Open

Comments

@gabalafou
Copy link
Contributor

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.

@trallard trallard added the type: enhancement 💅🏼 New feature or request label Nov 8, 2022
@trallard trallard changed the title Modify testing action so that it checks out its own repository ENH - Modify testing action so that it checks out its own repository Dec 16, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Backlog 🗃
Development

No branches or pull requests

2 participants