Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixes #790 (sort of)
This is a fairly hacky fix for failing windows tests, but there don't seem to be many good options.
Windows test is failing on forked PRs, because forks don't have access to secrets, and thus
secrets.DOCKERHUB_TOKEN
evals to empty string.This PR forces the windows test to be a no-op in this situation. It's not ideal, but neither is removing pull-requests as an event, because this should be working for collaborators and it would be a shame to lose that.
The clumsy approach you see wrt setting DOCKERHUB_TOKEN envvar in each step is explained here: https://gh.neting.ccmunity/t5/GitHub-Actions/If-expression-with-context-variable/td-p/34556. Basically, you can't use
jobs.{jobname}.if
because this doesn't have access to thesecrets
context (why??).Anyway the aim of this PR is to have windows test in as good a shape as it can be currently. Happy to revert this to something else later.
ps:
It's also not great because the fork user may have an unrelated DOCKERHUB_TOKEN secret. Chances of that are low, and this is hopefully a semi-temporary fix, so I think we can live with this for now. Unfortunately there's no such thing as a 'user' context in github Actions where you might check user permissions and have an if condition on that :/