diff --git a/integrations/github/actions.json b/integrations/github/actions.json index 26ffd78..c322b2e 100644 --- a/integrations/github/actions.json +++ b/integrations/github/actions.json @@ -1,198 +1,380 @@ [ { - "identifier": "github_scaffold_service", + "identifier": "service_github_scaffold_service", "title": "Scaffold Service", "icon": "Microservice", - "userInputs": { - "properties": { - "service_name": { - "title": "Service Name", - "description": "The new service's name", - "type": "string" - } + "description": "To complete setting up this action, please refer to the following guide: [Setup scaffold service action ->](https://docs.getport.io/guides-and-tutorials/scaffold-a-new-service?git-provider=github)", + "trigger": { + "type": "self-service", + "operation": "CREATE", + "userInputs": { + "properties": { + "service_name": { + "title": "Service Name", + "description": "The new service's name", + "type": "string" + } + }, + "required": [ + "service_name" + ], + "order": [ + "service_name" + ] }, - "required": [ - "service_name" - ], - "order": [ - "service_name" - ] + "blueprintIdentifier": "service" }, "invocationMethod": { "type": "GITHUB", "org": "", "repo": "", "workflow": "port-create-repo.yml", - "omitUserInputs": true, - "omitPayload": false, + "workflowInputs": { + "{{if (.inputs | has(\"ref\")) then \"ref\" else null end}}": "{{.inputs.\"ref\"}}", + "port_payload": { + "action": "{{ .action.identifier[(\"service_\" | length):] }}", + "resourceType": "run", + "status": "TRIGGERED", + "trigger": "{{ .trigger | {by, origin, at} }}", + "context": { + "entity": "{{.entity.identifier}}", + "blueprint": "{{.action.blueprint}}", + "runId": "{{.run.id}}" + }, + "payload": { + "entity": "{{ (if .entity == {} then null else .entity end) }}", + "action": { + "invocationMethod": { + "type": "GITHUB", + "org": "", + "repo": "", + "workflow": "port-create-repo.yml", + "omitUserInputs": true, + "omitPayload": false, + "reportWorkflowStatus": true + }, + "trigger": "{{.trigger.operation}}" + }, + "properties": { + "{{if (.inputs | has(\"service_name\")) then \"service_name\" else null end}}": "{{.inputs.\"service_name\"}}" + }, + "censoredProperties": "{{.action.encryptedProperties}}" + } + } + }, "reportWorkflowStatus": true }, - "trigger": "CREATE", - "description": "To complete setting up this action, please refer to the following guide: [Setup scaffold service action ->](https://docs.getport.io/guides-and-tutorials/scaffold-a-new-service?git-provider=github)", "requiredApproval": false, - "blueprint": "service" + "publish": true }, { - "identifier": "create_github_secret", + "identifier": "service_create_github_secret", "title": "Create GitHub Secret", "icon": "Github", - "userInputs": { - "properties": { - "secret_key": { - "icon": "DefaultProperty", - "title": "Secret Key", - "type": "string", - "pattern": "^[^a-z]*$" + "description": "To complete setting up this action, please refer to the following guide: [Setup create github secret action ->](https://docs.getport.io/create-self-service-experiences/setup-backend/github-workflow/examples/create-github-secret)", + "trigger": { + "type": "self-service", + "operation": "CREATE", + "userInputs": { + "properties": { + "secret_key": { + "icon": "DefaultProperty", + "title": "Secret Key", + "type": "string", + "pattern": "^[^a-z]*$" + }, + "secret_value": { + "icon": "DefaultProperty", + "title": "Secret Value", + "type": "string", + "encryption": "aes256-gcm" + } }, - "secret_value": { - "icon": "DefaultProperty", - "title": "Secret Value", - "type": "string", - "encryption": "aes256-gcm" - } + "required": [ + "secret_key", + "secret_value" + ], + "order": [ + "secret_key", + "secret_value" + ] }, - "required": [ - "secret_key", - "secret_value" - ], - "order": [ - "secret_key", - "secret_value" - ] + "blueprintIdentifier": "service" }, "invocationMethod": { "type": "GITHUB", "org": "", "repo": "", "workflow": "create-repo-secret.yml", - "omitUserInputs": false, - "omitPayload": false, + "workflowInputs": { + "{{if (.inputs | has(\"ref\")) then \"ref\" else null end}}": "{{.inputs.\"ref\"}}", + "{{if (.inputs | has(\"secret_key\")) then \"secret_key\" else null end}}": "{{.inputs.\"secret_key\"}}", + "{{if (.inputs | has(\"secret_value\")) then \"secret_value\" else null end}}": "{{.inputs.\"secret_value\"}}", + "port_payload": { + "action": "{{ .action.identifier[(\"service_\" | length):] }}", + "resourceType": "run", + "status": "TRIGGERED", + "trigger": "{{ .trigger | {by, origin, at} }}", + "context": { + "entity": "{{.entity.identifier}}", + "blueprint": "{{.action.blueprint}}", + "runId": "{{.run.id}}" + }, + "payload": { + "entity": "{{ (if .entity == {} then null else .entity end) }}", + "action": { + "invocationMethod": { + "type": "GITHUB", + "org": "", + "repo": "", + "workflow": "create-repo-secret.yml", + "omitUserInputs": false, + "omitPayload": false, + "reportWorkflowStatus": true + }, + "trigger": "{{.trigger.operation}}" + }, + "properties": { + "{{if (.inputs | has(\"secret_key\")) then \"secret_key\" else null end}}": "{{.inputs.\"secret_key\"}}", + "{{if (.inputs | has(\"secret_value\")) then \"secret_value\" else null end}}": "{{.inputs.\"secret_value\"}}" + }, + "censoredProperties": "{{.action.encryptedProperties}}" + } + } + }, "reportWorkflowStatus": true }, - "trigger": "CREATE", - "description": "To complete setting up this action, please refer to the following guide: [Setup create github secret action ->](https://docs.getport.io/create-self-service-experiences/setup-backend/github-workflow/examples/create-github-secret)", "requiredApproval": false, - "blueprint": "service" + "publish": true }, { - "identifier": "promote_to_production", + "identifier": "service_promote_to_production", "title": "Promote to Production", "icon": "Argo", - "userInputs": { - "properties": {}, - "required": [] + "description": "To complete setting up this action, please refer to the following guide: [Setup Promote to production action ->](https://docs.getport.io/create-self-service-experiences/setup-backend/github-workflow/examples/promote-to-production)", + "trigger": { + "type": "self-service", + "operation": "DAY-2", + "userInputs": { + "properties": {}, + "required": [] + }, + "blueprintIdentifier": "service" }, "invocationMethod": { "type": "GITHUB", "org": "", "repo": "", "workflow": "promote-production.yml", - "omitUserInputs": true, - "omitPayload": false, + "workflowInputs": { + "{{if (.inputs | has(\"ref\")) then \"ref\" else null end}}": "{{.inputs.\"ref\"}}", + "port_payload": { + "action": "{{ .action.identifier[(\"service_\" | length):] }}", + "resourceType": "run", + "status": "TRIGGERED", + "trigger": "{{ .trigger | {by, origin, at} }}", + "context": { + "entity": "{{.entity.identifier}}", + "blueprint": "{{.action.blueprint}}", + "runId": "{{.run.id}}" + }, + "payload": { + "entity": "{{ (if .entity == {} then null else .entity end) }}", + "action": { + "invocationMethod": { + "type": "GITHUB", + "org": "", + "repo": "", + "workflow": "promote-production.yml", + "omitUserInputs": true, + "omitPayload": false, + "reportWorkflowStatus": true + }, + "trigger": "{{.trigger.operation}}" + }, + "properties": {}, + "censoredProperties": "{{.action.encryptedProperties}}" + } + } + }, "reportWorkflowStatus": true }, - "trigger": "DAY-2", - "description": "To complete setting up this action, please refer to the following guide: [Setup Promote to production action ->](https://docs.getport.io/create-self-service-experiences/setup-backend/github-workflow/examples/promote-to-production)", "requiredApproval": false, - "blueprint": "service" + "publish": true }, { - "identifier": "lock_service", + "identifier": "service_lock_service", "title": "Lock Service", "icon": "Lock", - "userInputs": { - "properties": { - "reason": { - "title": "Reason", - "type": "string" - }, - "environment": { - "icon": "DefaultProperty", - "title": "Environment", - "type": "string", - "enum": [ - "Production", - "Development", - "Staging" - ], - "enumColors": { - "Production": "lightGray", - "Development": "lightGray", - "Staging": "lightGray" + "description": "To complete setting up this action, please refer to the following guide: [Setup lock service in Port ->](https://docs.getport.io/create-self-service-experiences/setup-backend/github-workflow/examples/lock-and_unlock-service-in-port)", + "trigger": { + "type": "self-service", + "operation": "DAY-2", + "userInputs": { + "properties": { + "reason": { + "title": "Reason", + "type": "string" + }, + "environment": { + "icon": "DefaultProperty", + "title": "Environment", + "type": "string", + "enum": [ + "Production", + "Development", + "Staging" + ], + "enumColors": { + "Production": "lightGray", + "Development": "lightGray", + "Staging": "lightGray" + } } - } + }, + "required": [ + "environment", + "reason" + ], + "order": [ + "environment", + "reason" + ] }, - "required": [ - "environment", - "reason" - ], - "order": [ - "environment", - "reason" - ] + "blueprintIdentifier": "service" }, "invocationMethod": { "type": "GITHUB", "org": "", "repo": "", "workflow": "lock-service.yml", - "omitUserInputs": false, - "omitPayload": false, + "workflowInputs": { + "{{if (.inputs | has(\"ref\")) then \"ref\" else null end}}": "{{.inputs.\"ref\"}}", + "{{if (.inputs | has(\"reason\")) then \"reason\" else null end}}": "{{.inputs.\"reason\"}}", + "{{if (.inputs | has(\"environment\")) then \"environment\" else null end}}": "{{.inputs.\"environment\"}}", + "port_payload": { + "action": "{{ .action.identifier[(\"service_\" | length):] }}", + "resourceType": "run", + "status": "TRIGGERED", + "trigger": "{{ .trigger | {by, origin, at} }}", + "context": { + "entity": "{{.entity.identifier}}", + "blueprint": "{{.action.blueprint}}", + "runId": "{{.run.id}}" + }, + "payload": { + "entity": "{{ (if .entity == {} then null else .entity end) }}", + "action": { + "invocationMethod": { + "type": "GITHUB", + "org": "", + "repo": "", + "workflow": "lock-service.yml", + "omitUserInputs": false, + "omitPayload": false, + "reportWorkflowStatus": true + }, + "trigger": "{{.trigger.operation}}" + }, + "properties": { + "{{if (.inputs | has(\"reason\")) then \"reason\" else null end}}": "{{.inputs.\"reason\"}}", + "{{if (.inputs | has(\"environment\")) then \"environment\" else null end}}": "{{.inputs.\"environment\"}}" + }, + "censoredProperties": "{{.action.encryptedProperties}}" + } + } + }, "reportWorkflowStatus": true }, - "trigger": "DAY-2", - "description": "To complete setting up this action, please refer to the following guide: [Setup lock service in Port ->](https://docs.getport.io/create-self-service-experiences/setup-backend/github-workflow/examples/lock-and_unlock-service-in-port)", "requiredApproval": false, - "blueprint": "service" + "publish": true }, { - "identifier": "unlock_service", + "identifier": "service_unlock_service", "title": "Unlock Service", "icon": "Unlock", - "userInputs": { - "properties": { - "reason": { - "title": "Reason", - "type": "string" - }, - "environment": { - "icon": "DefaultProperty", - "title": "Environment", - "type": "string", - "enum": [ - "Production", - "Development", - "Staging" - ], - "enumColors": { - "Production": "lightGray", - "Development": "lightGray", - "Staging": "lightGray" + "description": "To complete setting up this action, please refer to the following guide: [Setup unlock service in Port ->](https://docs.getport.io/create-self-service-experiences/setup-backend/github-workflow/examples/lock-and_unlock-service-in-port)", + "trigger": { + "type": "self-service", + "operation": "DAY-2", + "userInputs": { + "properties": { + "reason": { + "title": "Reason", + "type": "string" + }, + "environment": { + "icon": "DefaultProperty", + "title": "Environment", + "type": "string", + "enum": [ + "Production", + "Development", + "Staging" + ], + "enumColors": { + "Production": "lightGray", + "Development": "lightGray", + "Staging": "lightGray" + } } - } + }, + "required": [ + "environment", + "reason" + ], + "order": [ + "environment", + "reason" + ] }, - "required": [ - "environment", - "reason" - ], - "order": [ - "environment", - "reason" - ] + "blueprintIdentifier": "service" }, "invocationMethod": { "type": "GITHUB", "org": "", "repo": "", "workflow": "unlock-service.yml", - "omitUserInputs": false, - "omitPayload": false, + "workflowInputs": { + "{{if (.inputs | has(\"ref\")) then \"ref\" else null end}}": "{{.inputs.\"ref\"}}", + "{{if (.inputs | has(\"reason\")) then \"reason\" else null end}}": "{{.inputs.\"reason\"}}", + "{{if (.inputs | has(\"environment\")) then \"environment\" else null end}}": "{{.inputs.\"environment\"}}", + "port_payload": { + "action": "{{ .action.identifier[(\"service_\" | length):] }}", + "resourceType": "run", + "status": "TRIGGERED", + "trigger": "{{ .trigger | {by, origin, at} }}", + "context": { + "entity": "{{.entity.identifier}}", + "blueprint": "{{.action.blueprint}}", + "runId": "{{.run.id}}" + }, + "payload": { + "entity": "{{ (if .entity == {} then null else .entity end) }}", + "action": { + "invocationMethod": { + "type": "GITHUB", + "org": "", + "repo": "", + "workflow": "unlock-service.yml", + "omitUserInputs": false, + "omitPayload": false, + "reportWorkflowStatus": true + }, + "trigger": "{{.trigger.operation}}" + }, + "properties": { + "{{if (.inputs | has(\"reason\")) then \"reason\" else null end}}": "{{.inputs.\"reason\"}}", + "{{if (.inputs | has(\"environment\")) then \"environment\" else null end}}": "{{.inputs.\"environment\"}}" + }, + "censoredProperties": "{{.action.encryptedProperties}}" + } + } + }, "reportWorkflowStatus": true }, - "trigger": "DAY-2", - "description": "To complete setting up this action, please refer to the following guide: [Setup unlock service in Port ->](https://docs.getport.io/create-self-service-experiences/setup-backend/github-workflow/examples/lock-and_unlock-service-in-port)", "requiredApproval": false, - "blueprint": "service" + "publish": true }, { "identifier": "nudge_reviewers", @@ -217,171 +399,318 @@ "blueprint": "githubPullRequest" }, { - "identifier": "github_enrich_service", + "identifier": "service_github_enrich_service", "title": "Enrich service", "icon": "Git", - "userInputs": { - "properties": { - "type": { - "icon": "BlankPage", - "title": "Type", - "description": "The service's type", - "type": "string", - "enum": [ - "backend", - "frontend", - "integration" - ], - "enumColors": { - "backend": "lightGray", - "frontend": "lightGray", - "integration": "lightGray" + "description": "To complete setting up this action, please refer to the following guide: [Setup enrich service action ->](https://docs.getport.io/guides-and-tutorials/let-developers-enrich-services-using-gitops?git-provider=github)", + "trigger": { + "type": "self-service", + "operation": "DAY-2", + "userInputs": { + "properties": { + "type": { + "icon": "BlankPage", + "title": "Type", + "description": "The service's type", + "type": "string", + "enum": [ + "backend", + "frontend", + "integration" + ], + "enumColors": { + "backend": "lightGray", + "frontend": "lightGray", + "integration": "lightGray" + } + }, + "lifecycle": { + "icon": "CICD", + "title": "Lifecycle", + "description": "The service's lifecycle state", + "type": "string", + "enum": [ + "Production", + "Experimental", + "Deprecated" + ], + "enumColors": { + "Production": "green", + "Experimental": "orange", + "Deprecated": "red" + } } }, - "lifecycle": { - "icon": "CICD", - "title": "Lifecycle", - "description": "The service's lifecycle state", - "type": "string", - "enum": [ - "Production", - "Experimental", - "Deprecated" - ], - "enumColors": { - "Production": "green", - "Experimental": "orange", - "Deprecated": "red" - } - } + "required": [], + "order": [ + "type", + "lifecycle" + ] }, - "required": [], - "order": [ - "type", - "lifecycle" - ] + "blueprintIdentifier": "service" }, "invocationMethod": { "type": "GITHUB", - "omitPayload": false, - "omitUserInputs": false, - "reportWorkflowStatus": true, "org": "", "repo": "", - "workflow": "port-enrich-service.yaml" + "workflow": "port-enrich-service.yaml", + "workflowInputs": { + "{{if (.inputs | has(\"ref\")) then \"ref\" else null end}}": "{{.inputs.\"ref\"}}", + "{{if (.inputs | has(\"type\")) then \"type\" else null end}}": "{{.inputs.\"type\"}}", + "{{if (.inputs | has(\"lifecycle\")) then \"lifecycle\" else null end}}": "{{.inputs.\"lifecycle\"}}", + "port_payload": { + "action": "{{ .action.identifier[(\"service_\" | length):] }}", + "resourceType": "run", + "status": "TRIGGERED", + "trigger": "{{ .trigger | {by, origin, at} }}", + "context": { + "entity": "{{.entity.identifier}}", + "blueprint": "{{.action.blueprint}}", + "runId": "{{.run.id}}" + }, + "payload": { + "entity": "{{ (if .entity == {} then null else .entity end) }}", + "action": { + "invocationMethod": { + "type": "GITHUB", + "omitPayload": false, + "omitUserInputs": false, + "reportWorkflowStatus": true, + "org": "", + "repo": "", + "workflow": "port-enrich-service.yaml" + }, + "trigger": "{{.trigger.operation}}" + }, + "properties": { + "{{if (.inputs | has(\"type\")) then \"type\" else null end}}": "{{.inputs.\"type\"}}", + "{{if (.inputs | has(\"lifecycle\")) then \"lifecycle\" else null end}}": "{{.inputs.\"lifecycle\"}}" + }, + "censoredProperties": "{{.action.encryptedProperties}}" + } + } + }, + "reportWorkflowStatus": true }, - "trigger": "DAY-2", - "description": "To complete setting up this action, please refer to the following guide: [Setup enrich service action ->](https://docs.getport.io/guides-and-tutorials/let-developers-enrich-services-using-gitops?git-provider=github)", "requiredApproval": false, - "blueprint": "service" + "publish": true }, { - "identifier": "github_send_scorecard_reminder", - "icon": "Slack", + "identifier": "service_github_send_scorecard_reminder", "title": "Send scorecard reminder", - "userInputs": { - "properties": {}, - "required": [] + "icon": "Slack", + "description": "To complete setting up this action, please refer to the following guide: [Setup send scorecard reminder action ->](https://docs.getport.io/guides-and-tutorials/setup-slack-reminders?git-provider=github)", + "trigger": { + "type": "self-service", + "operation": "CREATE", + "userInputs": { + "properties": {}, + "required": [] + }, + "blueprintIdentifier": "service" }, "invocationMethod": { "type": "GITHUB", - "omitPayload": false, - "omitUserInputs": false, - "reportWorkflowStatus": true, - "org": "", - "repo": "", - "workflow": "port-slack-reminder.yml" + "org": "Fill here your org name", + "repo": "Fill here your repo name", + "workflow": "Fill here your workflow name", + "workflowInputs": { + "{{if (.inputs | has(\"ref\")) then \"ref\" else null end}}": "{{.inputs.\"ref\"}}", + "port_payload": { + "action": "{{ .action.identifier[(\"service_\" | length):] }}", + "resourceType": "run", + "status": "TRIGGERED", + "trigger": "{{ .trigger | {by, origin, at} }}", + "context": { + "entity": "{{.entity.identifier}}", + "blueprint": "{{.action.blueprint}}", + "runId": "{{.run.id}}" + }, + "payload": { + "entity": "{{ (if .entity == {} then null else .entity end) }}", + "action": { + "invocationMethod": { + "type": "GITHUB", + "omitPayload": false, + "omitUserInputs": false, + "reportWorkflowStatus": true, + "org": "Fill here your org name", + "repo": "Fill here your repo name", + "workflow": "Fill here your workflow name" + }, + "trigger": "{{.trigger.operation}}" + }, + "properties": {}, + "censoredProperties": "{{.action.encryptedProperties}}" + } + } + }, + "reportWorkflowStatus": true }, - "trigger": "CREATE", - "description": "To complete setting up this action, please refer to the following guide: [Setup send scorecard reminder action ->](https://docs.getport.io/guides-and-tutorials/setup-slack-reminders?git-provider=github)", "requiredApproval": false, - "blueprint": "service" + "publish": true }, { - "identifier": "github_create_s3_bucket", - "icon": "S3", + "identifier": "service_github_create_s3_bucket", "title": "Create s3 bucket", - "userInputs": { - "properties": { - "name": { - "title": "Name", - "description": "The name of the cloud resource", - "type": "string" - }, - "visibility": { - "title": "Visibility", - "description": "The resource's public/private visibility", - "type": "string", - "enum": [ - "public", - "private" - ], - "enumColors": { - "public": "green", - "private": "red" + "icon": "S3", + "description": "To complete setting up this action, please refer to the following guide: [Setup create s3 bucket ->](https://docs.getport.io/guides-and-tutorials/create-cloud-resource-using-iac?git-provider=github)", + "trigger": { + "type": "self-service", + "operation": "DAY-2", + "userInputs": { + "properties": { + "name": { + "title": "Name", + "description": "The name of the cloud resource", + "type": "string" + }, + "visibility": { + "title": "Visibility", + "description": "The resource's public/private visibility", + "type": "string", + "enum": [ + "public", + "private" + ], + "enumColors": { + "public": "green", + "private": "red" + } } - } + }, + "required": [ + "name", + "visibility" + ], + "order": [ + "name", + "visibility" + ] }, - "required": [ - "name", - "visibility" - ], - "order": [ - "name", - "visibility" - ] + "blueprintIdentifier": "service" }, "invocationMethod": { "type": "GITHUB", - "omitPayload": false, - "omitUserInputs": false, - "reportWorkflowStatus": true, "org": "", "repo": "", - "workflow": "port-create-bucket.yml" + "workflow": "port-create-bucket.yml", + "workflowInputs": { + "{{if (.inputs | has(\"ref\")) then \"ref\" else null end}}": "{{.inputs.\"ref\"}}", + "{{if (.inputs | has(\"name\")) then \"name\" else null end}}": "{{.inputs.\"name\"}}", + "{{if (.inputs | has(\"visibility\")) then \"visibility\" else null end}}": "{{.inputs.\"visibility\"}}", + "port_payload": { + "action": "{{ .action.identifier[(\"service_\" | length):] }}", + "resourceType": "run", + "status": "TRIGGERED", + "trigger": "{{ .trigger | {by, origin, at} }}", + "context": { + "entity": "{{.entity.identifier}}", + "blueprint": "{{.action.blueprint}}", + "runId": "{{.run.id}}" + }, + "payload": { + "entity": "{{ (if .entity == {} then null else .entity end) }}", + "action": { + "invocationMethod": { + "type": "GITHUB", + "omitPayload": false, + "omitUserInputs": false, + "reportWorkflowStatus": true, + "org": "", + "repo": "", + "workflow": "port-create-bucket.yml" + }, + "trigger": "{{.trigger.operation}}" + }, + "properties": { + "{{if (.inputs | has(\"name\")) then \"name\" else null end}}": "{{.inputs.\"name\"}}", + "{{if (.inputs | has(\"visibility\")) then \"visibility\" else null end}}": "{{.inputs.\"visibility\"}}" + }, + "censoredProperties": "{{.action.encryptedProperties}}" + } + } + }, + "reportWorkflowStatus": true }, - "trigger": "DAY-2", - "description": "To complete setting up this action, please refer to the following guide: [Setup create s3 bucket ->](https://docs.getport.io/guides-and-tutorials/create-cloud-resource-using-iac?git-provider=github)", "requiredApproval": false, - "blueprint": "service" + "publish": true }, { - "identifier": "delete_repo", + "identifier": "service_delete_repo", "title": "Delete Repo", "icon": "Github", - "userInputs": { - "properties": { - "org_name": { - "icon": "Github", - "title": "Organisation Name", - "type": "string", - "default": "default-org" + "description": "To complete setting up this action, please refer to the following guide: [Setup delete a repository action ->](https://docs.getport.io/create-self-service-experiences/setup-backend/github-workflow/examples/delete-repository/)", + "trigger": { + "type": "self-service", + "operation": "DELETE", + "userInputs": { + "properties": { + "org_name": { + "icon": "Github", + "title": "Organisation Name", + "type": "string", + "default": "default-org" + }, + "delete_dependents": { + "icon": "Github", + "title": "Delete Dependent Items", + "type": "boolean", + "default": false + } }, - "delete_dependents": { - "icon": "Github", - "title": "Delete Dependent Items", - "type": "boolean", - "default": false - } + "required": [], + "order": [ + "org_name", + "delete_dependents" + ] }, - "required": [], - "order": [ - "org_name", - "delete_dependents" - ] + "blueprintIdentifier": "service" }, "invocationMethod": { "type": "GITHUB", "org": "", "repo": "", "workflow": "delete-repo.yml", - "omitUserInputs": false, - "omitPayload": false, + "workflowInputs": { + "{{if (.inputs | has(\"ref\")) then \"ref\" else null end}}": "{{.inputs.\"ref\"}}", + "{{if (.inputs | has(\"org_name\")) then \"org_name\" else null end}}": "{{.inputs.\"org_name\"}}", + "{{if (.inputs | has(\"delete_dependents\")) then \"delete_dependents\" else null end}}": "{{.inputs.\"delete_dependents\"}}", + "port_payload": { + "action": "{{ .action.identifier[(\"service_\" | length):] }}", + "resourceType": "run", + "status": "TRIGGERED", + "trigger": "{{ .trigger | {by, origin, at} }}", + "context": { + "entity": "{{.entity.identifier}}", + "blueprint": "{{.action.blueprint}}", + "runId": "{{.run.id}}" + }, + "payload": { + "entity": "{{ (if .entity == {} then null else .entity end) }}", + "action": { + "invocationMethod": { + "type": "GITHUB", + "org": "", + "repo": "", + "workflow": "delete-repo.yml", + "omitUserInputs": false, + "omitPayload": false, + "reportWorkflowStatus": true + }, + "trigger": "{{.trigger.operation}}" + }, + "properties": { + "{{if (.inputs | has(\"org_name\")) then \"org_name\" else null end}}": "{{.inputs.\"org_name\"}}", + "{{if (.inputs | has(\"delete_dependents\")) then \"delete_dependents\" else null end}}": "{{.inputs.\"delete_dependents\"}}" + }, + "censoredProperties": "{{.action.encryptedProperties}}" + } + } + }, "reportWorkflowStatus": true }, - "trigger": "DELETE", - "description": "To complete setting up this action, please refer to the following guide: [Setup delete a repository action ->](https://docs.getport.io/create-self-service-experiences/setup-backend/github-workflow/examples/delete-repository/)", "requiredApproval": false, - "blueprint": "service" + "publish": true } ] \ No newline at end of file