Skip to content

feat(ci): add greenhouse PR preview workflow#1679

Open
ArtieReus wants to merge 8 commits intomainfrom
artie-pr-preview-image
Open

feat(ci): add greenhouse PR preview workflow#1679
ArtieReus wants to merge 8 commits intomainfrom
artie-pr-preview-image

Conversation

@ArtieReus
Copy link
Copy Markdown
Collaborator

Summary

Add a new GitHub Actions workflow to build Docker images for Greenhouse PR previews. The workflow builds images when the greenhouse-pr-build label is present, manages the greenhouse-pr-preview label for ArgoCD deployment, and cleans up images
when PRs are closed.

Changes Made

  • Add .github/workflows/build-push-greenhouse-pr-preview.yaml workflow
  • Workflow triggers on PR label, synchronize, opened, reopened, and closed events
  • Build job creates Docker image with tag pr-{number}-{sha} when greenhouse-pr-build label is present
  • On new commits, removes preview label before rebuild and re-adds after success (triggers ArgoCD redeployment)
  • Cleanup job deletes all PR images using crane when PR is closed/merged
  • Uses separate image name juno-app-greenhouse-pr-preview to avoid collision with production images

Related Issues

Testing Instructions

  1. Create a PR with changes to apps/greenhouse/**
  2. Add the greenhouse-pr-build label to the PR
  3. Verify the workflow runs and builds the image
  4. Check that greenhouse-pr-preview label is added after successful build
  5. Push a new commit to the PR
  6. Verify the preview label is removed, image rebuilt, and label re-added
  7. Close the PR and verify images are cleaned up

Checklist

  • I have performed a self-review of my code.
  • I have commented my code, particularly in hard-to-understand areas.
  • I have added tests that prove my fix is effective or that my feature works.
  • New and existing unit tests pass locally with my changes.
  • I have made corresponding changes to the documentation (if applicable).
  • My changes generate no new warnings or errors.
  • I have created a changeset for my changes.

PR Manifesto

Review the PR Manifesto for best practises.

Signed-off-by: Arturo Reuschenbach Puncernau <reuschenbach@gmail.com>
Copilot AI review requested due to automatic review settings May 8, 2026 11:31
@ArtieReus ArtieReus requested a review from a team as a code owner May 8, 2026 11:31
@changeset-bot
Copy link
Copy Markdown

changeset-bot Bot commented May 8, 2026

⚠️ No Changeset found

Latest commit: 92cf0f6

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Adds a dedicated GitHub Actions workflow to build/push Docker images for Greenhouse PR preview deployments, controlled via PR labels, and to clean up preview images when PRs close.

Changes:

  • Introduces a PR-triggered workflow that builds and pushes a pr-{number}-{sha}-tagged image when greenhouse-pr-build is present.
  • Manages the greenhouse-pr-preview label to trigger ArgoCD redeployments on new commits.
  • Adds a cleanup job to delete PR-scoped image tags on PR close.

Comment thread .github/workflows/build-push-greenhouse-pr-preview.yaml
Comment thread .github/workflows/build-push-greenhouse-pr-preview.yaml
Comment thread .github/workflows/build-push-greenhouse-pr-preview.yaml
Comment thread .github/workflows/build-push-greenhouse-pr-preview.yaml Outdated
Comment thread .github/workflows/build-push-greenhouse-pr-preview.yaml Outdated
Comment thread .github/workflows/build-push-greenhouse-pr-preview.yaml Outdated
Signed-off-by: Arturo Reuschenbach Puncernau <reuschenbach@gmail.com>
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 1 out of 1 changed files in this pull request and generated 3 comments.

Comment thread .github/workflows/build-push-greenhouse-pr-preview.yaml
Comment thread .github/workflows/build-push-greenhouse-pr-preview.yaml Outdated
Comment thread .github/workflows/build-push-greenhouse-pr-preview.yaml
ArtieReus added 2 commits May 8, 2026 14:14
Signed-off-by: Arturo Reuschenbach Puncernau <reuschenbach@gmail.com>
Signed-off-by: Arturo Reuschenbach Puncernau <reuschenbach@gmail.com>
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 1 out of 1 changed files in this pull request and generated 2 comments.

Comment thread .github/workflows/build-push-greenhouse-pr-preview.yaml
Comment thread .github/workflows/build-push-greenhouse-pr-preview.yaml
ArtieReus added 3 commits May 8, 2026 14:37
Signed-off-by: Arturo Reuschenbach Puncernau <reuschenbach@gmail.com>
Signed-off-by: Arturo Reuschenbach Puncernau <reuschenbach@gmail.com>
Signed-off-by: Arturo Reuschenbach Puncernau <reuschenbach@gmail.com>
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.

Comment thread .github/workflows/build-push-greenhouse-pr-preview.yaml Outdated
Comment thread .github/workflows/build-push-greenhouse-pr-preview.yaml Outdated
Comment thread docs/greenhouse-pr-preview-workflow.md
Signed-off-by: Arturo Reuschenbach Puncernau <reuschenbach@gmail.com>
@ArtieReus ArtieReus requested a review from Copilot May 8, 2026 12:55
@ArtieReus ArtieReus added the greenhouse Greenhouse core related task label May 8, 2026
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

greenhouse Greenhouse core related task

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants