Drive developer productivity by allowing developers to use self-service actions like scaffolding a service or provisioning a cloud resource. Read more
Port's action model is designed to be flexible and can be used to cover a wide range of use-cases:
- Unopinionated - flexible UI to create a wide range of self-service actions.
- Leverages existing infrastructure and automations as the backend of your actions.
- Loosely coupled to your infrastructure and architecture.
- Stateful - every invoked action affects the software catalog by adding/modifying/deleting one or more entities.
- Secure by design - does not require keys to sensitive infrastructure by using an event-based model. All actions are audited and can include guardrails like manual approval and TTL.
End result:
In this example, we'll create a self-service action that calls an external API from a GitHub Actions workflow.
Make sure you completed the Getting Started guide.
- Go to the Actions page.
- Click on the
+ Action
button. - Fill the Title, Description, and Icon as you see fit. For example:
- Title:
Setup Dummy S3 Bucket
- Description:
Setup a dummy S3 bucket for testing
- Icon: Search for S3 icon
- Title:
- Make sure
Operation
is set toCreate
- Leave all other fields as default and hit
Next
. - Add two new user inputs to the action by clicking on the
+ Input
button twice.- add
Webhook URL
- TypeText
- add
Payload
- TypeText
- add
- Hit
Next
. - Select the Run Github workflow backend.
- Fill in
Organization
- The organization name you forked this repository into. - Fill in
Repository
- Probablymicroservices-demo
, the repository name you forked this repository into. - Fill in
Worflow file name
- In this casesetup-dummy-s3-bucket.yml
, the workflow file name you want to run.
- Fill in
- Hit
Next
. - Hit
Create
.
Congratulations! You should see the action in the UI and it should be similar to the images above.
For testing purposes, we will use the webhook.site service to imitate an external API.
- Go to webhook.site and copy your unique URL.
- Click on the action card you just created.
- Fill in the
Webhook URL
andPayload
fields.- Use the URL you copied from webhook.site.
- Use the following payload:
"Hello, World!"
- Hit
Execute
.
You should see the action executed and the github workflow running in your repository.
After the workflow is finished, inside the webhook.site you should see the payload.
If you don't see the payload, check the following:
- Goto to the self-service tab in your repository and see if the workflow is running.
- Make sure the workflow is enabled in your repository.
- Goto the actions tab in your repository and make sure the workflow is enabled.