Skip to content

Slugify the branch name used as the docker image tag#2066

Merged
adam-urbanczyk merged 1 commit into
CadQuery:masterfrom
HaozheZhang6:ci/docker-image-tag
Jul 13, 2026
Merged

Slugify the branch name used as the docker image tag#2066
adam-urbanczyk merged 1 commit into
CadQuery:masterfrom
HaozheZhang6:ci/docker-image-tag

Conversation

@HaozheZhang6

Copy link
Copy Markdown
Contributor

The Build Docker job tags the image with the raw branch name:

BRANCH_NAME: ${{ github.head_ref || github.ref_name }}
...
docker build -t ghcr.io/cadquery/cadquery-docker:${BRANCH_NAME} -f images/dockerfile .

A docker tag cannot contain a slash, so any PR from a branch named like fix/... or docs/... fails the build before it even starts:

ERROR: failed to build: invalid tag "ghcr.io/cadquery/cadquery-docker:fix/assembly-load-segfault": invalid reference
##[error]Process completed with exit code 1.

That is currently red on #2064, #2065 and #2044.

This replaces the slashes when building the tag. master has none, so the tag pushed to GHCR is unchanged.

This branch has a slash in its own name, so the Build Docker job on this PR is the check.

The Build Docker job tags the image with the branch name, so any branch with
a slash in it fails the build:

  ERROR: failed to build: invalid tag
  "ghcr.io/cadquery/cadquery-docker:fix/assembly-load-segfault": invalid reference

Replace the slashes for the tag. On master the tag is unchanged, so the
published image keeps its name.
@codecov

codecov Bot commented Jul 13, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 95.79%. Comparing base (6d741ee) to head (b915ed7).

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #2066   +/-   ##
=======================================
  Coverage   95.79%   95.79%           
=======================================
  Files          30       30           
  Lines        9435     9435           
  Branches     1405     1405           
=======================================
  Hits         9038     9038           
  Misses        242      242           
  Partials      155      155           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@adam-urbanczyk adam-urbanczyk left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thanks @HaozheZhang6, LGTM.

@adam-urbanczyk

Copy link
Copy Markdown
Member

CI fix, merging.

@adam-urbanczyk adam-urbanczyk merged commit 6127da1 into CadQuery:master Jul 13, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants