Skip to content

ci: add docker-publish workflow so dispatch registers on main - #25

Merged
arnaubennassar merged 1 commit into
mainfrom
ci/docker-publish-workflow
Aug 12, 2026
Merged

ci: add docker-publish workflow so dispatch registers on main#25
arnaubennassar merged 1 commit into
mainfrom
ci/docker-publish-workflow

Conversation

@arnaubennassar

Copy link
Copy Markdown
Contributor

Why this is separate from PR #24

PR #24 (feat/aggkit-backend) is large, still in draft, and not ready to merge. However, .github/workflows/docker-publish.yaml needs to exist on the default branch (main) before GitHub will register its workflow_dispatch and release triggers — that registration only happens for workflow files present on the default branch, regardless of what other branches contain.

The exact failure that motivated this

$ gh workflow run docker-publish.yaml --repo agglayer/agglayer-dev-ui --ref feat/aggkit-backend
HTTP 404: workflow docker-publish.yaml not found on the default branch

What this PR does (and doesn't do)

After this merges

Dispatching against a feature branch (e.g. gh workflow run docker-publish.yaml --ref feat/aggkit-backend) will run that branch's copy of the workflow and check out that branch — the copy on main only needs to exist and be valid YAML to unlock registration; it doesn't need the Dockerfile or other PR #24 files to be present on main.


🤖 Generated with Claude Code

https://claude.ai/code/session_01SUseLAAcYiPPkqrUqFehtY

@arnaubennassar
arnaubennassar requested a review from a team as a code owner August 11, 2026 21:18
@claude

claude Bot commented Aug 11, 2026

Copy link
Copy Markdown

Code review

1 issue found. Checked for bugs and CLAUDE.md compliance.

Issue: Inline shell logic in workflow YAML (team standards violation)

File: .github/workflows/docker-publish.yaml, lines 135-197 and 243-280

The team standards require:

Keep workflow YAML thin — put logic in scripts. Any non-trivial shell logic (more than a single command) must live under .github/scripts/ or .github/actions/<name>/ so it can be run and debugged locally. YAML steps are just invocations. Never split logic across many steps sharing state via $GITHUB_OUTPUT.

This workflow has two steps with substantial inline shell:

  • "Compute image tags" (lines 135-197): ~43 lines of shell (semver parsing, prerelease detection, tag construction, collision guard)
  • "Smoke test pushed image" (lines 243-280): ~38 lines of shell (container run, polling loop, HTTP checks)

Additionally, "Compute image tags" writes to $GITHUB_OUTPUT for cross-step state sharing, which the rule explicitly prohibits.

Suggestion: Extract into .github/scripts/compute-image-tags.sh and .github/scripts/smoke-test.sh.

@arnaubennassar
arnaubennassar merged commit 76c59ed into main Aug 12, 2026
6 checks passed
@arnaubennassar
arnaubennassar deleted the ci/docker-publish-workflow branch August 12, 2026 07:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant