Skip to content
New issue

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

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

Already on GitHub? # to your account

Make use of the GITHUB_ACTION_REPOSITORY environment variable if it is set. #298

Merged
merged 2 commits into from
Nov 10, 2020

Conversation

chrisgavin
Copy link
Contributor

@chrisgavin chrisgavin commented Nov 10, 2020

Now that the change in actions/runner#585 is merged it should be possible to make use of the new GITHUB_ACTION_REPOSITORY environment variable, rather than relying on the more brittle guess at the name of the Action being used.

Unfortunately we can't fully remove the logic where we guess the Action repository name by the path at which it is checked out because users of GHES 2.22 might still need this, but it does mean we can put a final sunset date on the removal of this code once 2.22 reaches end-of-support.

I've also added some info-level logging in the hopefully rare case that GITHUB_ACTION_REPOSITORY is not set in order to help debug any issues caused by the guessing logic.

Merge / deployment checklist

  • Confirm this change is backwards compatible with existing workflows.
  • Confirm the readme has been updated if necessary.

@chrisgavin chrisgavin force-pushed the use-github-action-repository-variable branch from 6698486 to bf30ea6 Compare November 10, 2020 13:30
@chrisgavin chrisgavin marked this pull request as ready for review November 10, 2020 13:37
Copy link
Contributor

@robertbrignull robertbrignull left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

I agree we have to keep the compatibility code for now. Thanks for adding instructions into the code about when it can go.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants