Capability Spec
apiVersion: naftiko.dev/v1alpha1
kind: CapabilityWorkflow
metadata:
name: share-image-to-gallery
title: Share An Image To The Public Gallery
description: Upload an image, submit it to the public gallery, and confirm by reading the gallery item back.
spec:
inputs:
- name: filePath
description: Local image file path or remote URL to upload.
- name: title
description: Gallery submission title (required by Imgur).
- name: topic
description: Optional topic name to attach to the submission.
steps:
- id: upload
use: imgur/upload-image
with:
image: "{{ inputs.filePath }}"
type: url
title: "{{ inputs.title }}"
output: uploaded
- id: submit
use: imgur/submit-image-to-gallery
with:
title: "{{ inputs.title }}"
topic: "{{ inputs.topic }}"
terms: 1
imageId: "{{ uploaded.data.id }}"
- id: verify
use: imgur/get-gallery-image
with:
galleryHash: "{{ uploaded.data.id }}"
output: galleryItem
outputs:
imageId: "{{ uploaded.data.id }}"
link: "{{ uploaded.data.link }}"
galleryViews: "{{ galleryItem.data.views }}"