tegola icon indicating copy to clipboard operation
tegola copied to clipboard

ci: build docker only when secrets are present

Open iwpnd opened this issue 1 year ago β€’ 11 comments

as discussed in #995 docker build should only run if secrets.DOCKERHUB_USERNAME and secrets.DOCKERHUB_TOKEN are present.

iwpnd avatar Jul 01 '24 19:07 iwpnd

Pull Request Test Coverage Report for Build 5117e2b44-PR-996

Details

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage remained the same at 46.713%

Totals Coverage Status
Change from base Build 86cf1919d-PR-992: 0.0%
Covered Lines: 6551
Relevant Lines: 14024

πŸ’› - Coveralls

coveralls avatar Jul 01 '24 19:07 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.

ARolek avatar Jul 01 '24 20:07 ARolek

The failing docker build is part of on_release. If you do not want to build at all in PRs we can also remove the

on:
  pull_request:

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 avatar Jul 01 '24 21:07 iwpnd

@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! πŸ™

ARolek avatar Jul 01 '24 21:07 ARolek

@iwpnd it appears we have a syntax error in the workflow file:

image

Edit: Workflow run: https://github.com/go-spatial/tegola/actions/runs/9751755854

ARolek avatar Jul 01 '24 22:07 ARolek

@iwpnd it appears we have a syntax error in the workflow file:

image 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 πŸ™πŸ»

iwpnd avatar Jul 01 '24 22:07 iwpnd

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.

ARolek avatar Jul 01 '24 22:07 ARolek

Pull Request Test Coverage Report for Build 45fcda619-PR-996

Details

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage remained the same at 46.713%

Totals Coverage Status
Change from base Build c7296fdf0: 0.0%
Covered Lines: 6551
Relevant Lines: 14024

πŸ’› - Coveralls

coveralls avatar Jul 02 '24 01:07 coveralls

Pull Request Test Coverage Report for Build 2caf5013a-PR-996

Details

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage remained the same at 46.713%

Totals Coverage Status
Change from base Build c7296fdf0: 0.0%
Covered Lines: 6551
Relevant Lines: 14024

πŸ’› - Coveralls

coveralls avatar Jul 02 '24 10:07 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.

iwpnd avatar Jul 02 '24 10:07 iwpnd

Pull Request Test Coverage Report for Build 098825527-PR-996

Details

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage remained the same at 46.713%

Totals Coverage Status
Change from base Build c7296fdf0: 0.0%
Covered Lines: 6551
Relevant Lines: 14024

πŸ’› - Coveralls

coveralls avatar Jul 02 '24 11:07 coveralls

okay TIL i dont have access to secrets, but I can export secrets to the environment variables and use that instead.

Interesting! Still looks clean to me ;-)

ARolek avatar Jul 03 '24 16:07 ARolek

Pull Request Test Coverage Report for Build 6bb4ab97e-PR-996

Details

  • 1 of 1 (100.0%) changed or added relevant line in 1 file are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage remained the same at 46.713%

Totals Coverage Status
Change from base Build c7296fdf0: 0.0%
Covered Lines: 6551
Relevant Lines: 14024

πŸ’› - Coveralls

coveralls avatar Jul 03 '24 17:07 coveralls

Pull Request Test Coverage Report for Build 26ed63dc0-PR-996

Details

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage remained the same at 46.713%

Totals Coverage Status
Change from base Build c7296fdf0: 0.0%
Covered Lines: 6551
Relevant Lines: 14024

πŸ’› - Coveralls

coveralls avatar Jul 03 '24 19:07 coveralls