-
-
Notifications
You must be signed in to change notification settings - Fork 197
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
ci: build docker only when secrets are present #996
ci: build docker only when secrets are present #996
Conversation
Pull Request Test Coverage Report for Build 5117e2b44-PR-996Details
💛 - Coveralls |
@iwpnd thanks for jumping on this! I think you updated the wrong action though. I believe you meant to update https://github.com/go-spatial/tegola/blob/master/.github/workflows/on_pr_push.yml but instead updated the release action. |
The failing docker build is part of
from the release workflow. In that case we can also skip the check on whether the secrets are defined, because it only runs after the PR is merged. @ARolek |
@iwpnd ah yes, you're right! I remember when this was added years ago. It had to do with errors popping up during release that didn't get caught during the PR. So let's leave the check. Your changes LGTM! 🙏 |
@iwpnd it appears we have a syntax error in the workflow file: Edit: Workflow run: https://github.com/go-spatial/tegola/actions/runs/9751755854 |
I’ll take a look in the morning. Seems I don’t have access to secrets in the if statement after all. 🤔 sorry for the noise 🙏🏻 |
No worries! I was hoping this worked as it was a clean solution. |
Pull Request Test Coverage Report for Build 45fcda619-PR-996Details
💛 - Coveralls |
Pull Request Test Coverage Report for Build 2caf5013a-PR-996Details
💛 - Coveralls |
okay TIL i dont have access to secrets, but I can export secrets to the environment variables and use that instead. 😄 @ARolek now when we merge the secrets should be populated in those environment variables and the docker build should execute successfully and not be skipped. |
Pull Request Test Coverage Report for Build 098825527-PR-996Details
💛 - Coveralls |
Interesting! Still looks clean to me ;-) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! Can you please squash into a single commit?
c3d2174
to
aa8e390
Compare
Pull Request Test Coverage Report for Build 6bb4ab97e-PR-996Details
💛 - Coveralls |
Fix: use direct comparison instead of strings.Contains to filter layernames chore: fix inaccessible secrets chore: fix invalid mapping
aa8e390
to
7368dc9
Compare
Pull Request Test Coverage Report for Build 26ed63dc0-PR-996Details
💛 - Coveralls |
as discussed in #995 docker build should only run if
secrets.DOCKERHUB_USERNAME
andsecrets.DOCKERHUB_TOKEN
are present.