Skip to content

feat(ci): build Docker image on PR open/push with pr-<number> tag#18

Merged
vianmora merged 2 commits into
mainfrom
feat/docker-build-on-pr
May 17, 2026
Merged

feat(ci): build Docker image on PR open/push with pr-<number> tag#18
vianmora merged 2 commits into
mainfrom
feat/docker-build-on-pr

Conversation

@vianmora

Copy link
Copy Markdown
Contributor

Summary

Mirror of webstudio-community/webstudio-fork#15 for the publisher repo.

  • docker-publish.yml: add pull_request trigger (opened, synchronize, reopened) — builds and pushes a :pr-<number> image on every PR update
  • docker-cleanup.yml: updated to delete :pr-<number> tag on PR close (was deleting by branch name, which no longer matches)

PR images can be pulled and tested directly:

docker pull ghcr.io/webstudio-community/webstudio-publisher:pr-18

Test plan

  • Open a PR → verify the workflow runs and pushes a :pr-<number> image to GHCR
  • Push a new commit to the PR → verify the workflow re-runs and updates the image
  • Close the PR → verify the cleanup workflow deletes :pr-<number>
  • Push to main → verify :latest is still produced as before

🤖 Generated with Claude Code

vianmora and others added 2 commits May 17, 2026 17:18
Mirror of webstudio-community/webstudio-fork#15.

- docker-publish.yml: add pull_request trigger (opened, synchronize, reopened)
- Tag strategy: pr-${{ github.event.pull_request.number }} for PR builds
- docker-cleanup.yml: delete :pr-<number> tag on PR close (not branch tag)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Compute branch tag from github.head_ref on PR events (GITHUB_REF_NAME
  is "N/merge" for PRs, not the branch name)
- Both pull_request and workflow_dispatch now produce the same
  :<sanitized-branch> tag — consistent with how workflow_dispatch works
- Revert cleanup to delete by sanitized branch tag (not pr-<number>)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@vianmora vianmora merged commit 543f2a1 into main May 17, 2026
1 check passed
@vianmora vianmora deleted the feat/docker-build-on-pr branch May 17, 2026 16:00
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