Skip attach static libs if required secret is missing for external PRs #908
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.
This PR fixes the attach static libraries workflow to ensure that it skips the first job (and subsequent jobs) that depend on the ability to push a firewood go library to an external repo if secrets are not available.
PRs made from external forks and via dependabot (special case where secrets are not made available) will fail on this workflow because it depends on GitHub secrets to push to a separate repo.
To handle this, we
push
)This fixes the issue for the following dependabot PRs:
Skipping runs from external forks is a common pattern as described here and we may even opt to run this job less frequently in the future, so disabling for all external forks seems like the best choice here (possible alternative would be to push an artifact including the source code and pull that instead of cloning the repo in order to run the same tests using the artifact instead of checking out a branch).