Skip to content

feat(ci): Indicate whether an image was pushed#365

Open
misund wants to merge 2 commits intomainfrom
feat/pushed-image-bool
Open

feat(ci): Indicate whether an image was pushed#365
misund wants to merge 2 commits intomainfrom
feat/pushed-image-bool

Conversation

@misund
Copy link
Member

@misund misund commented Nov 21, 2025

Adds an output that indicates whether an image was pushed.

Dependant workflows can use this output to evaluate whether they should
conditionally execute deployment or other downstream actions based on
whether image building occurred.

Changes:

  • Add oci-image-pushed output to mage.yaml
  • Add oci-image-pushed output to goapp.yaml and reusable-goapp.yaml
  • Set output based on presence of var/oci-images.json file

@misund misund changed the title feat/pushed image bool feat(ci): Indicate whether an image was pushed Nov 21, 2025
@misund misund marked this pull request as ready for review November 21, 2025 13:02
@misund misund force-pushed the feat/pushed-image-bool branch from 91313ad to bd618ec Compare November 21, 2025 13:27
bendiknesbo
bendiknesbo previously approved these changes Nov 21, 2025
Copy link
Contributor

@bendiknesbo bendiknesbo left a comment

Choose a reason for hiding this comment

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

Awesome! <3

@misund
Copy link
Member Author

misund commented Nov 21, 2025

Can I get an extra quick assessment about dashes versus underscores in the output variable name? I see that the neighboring oci-images is dash-cased..

@bendiknesbo
Copy link
Contributor

Can I get an extra quick assessment about dashes versus underscores in the output variable name? I see that the neighboring oci-images is dash-cased..

Yeah, maybe copying oci-images and use dashes instead of underscores everywhere is a good idea

@misund misund force-pushed the feat/pushed-image-bool branch from bd618ec to 8907576 Compare November 21, 2025 13:54
Adds an output that indicates whether an image was pushed.

Dependant workflows can use this output to evaluate whether they should
conditionally execute deployment or other downstream actions based on
whether image building occurred.

Changes:
- Add oci-image-pushed output to mage.yaml
- Add oci-image-pushed output to goapp.yaml and reusable-goapp.yaml
- Set output based on presence of var/oci-images.json file
@misund misund force-pushed the feat/pushed-image-bool branch from 8907576 to beec508 Compare November 21, 2025 13:55
@misund misund requested a review from bendiknesbo November 21, 2025 13:57
@AtzeDeVries
Copy link
Contributor

AtzeDeVries commented Nov 21, 2025

Yeah this would be an good idea i guess. But this one lines would do the same if i am correct

if: github.ref == 'refs/heads/main' && needs.mage.outputs.oci-images != ''

https://github.com/coopnorge/customer-order-management/blob/main/.github/workflows/cicd.yaml#L76

@misund
Copy link
Member Author

misund commented Nov 21, 2025

Either way is fine with me, I think mine seems more intuitive, on the other hand the customer-order-management version already works with the status quo

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.

3 participants