https://github.com/porter-dev/porter-preview-action
Github Action that creates preview environments on Porter.
https://github.com/porter-dev/porter-preview-action
Last synced: 2 months ago
JSON representation
Github Action that creates preview environments on Porter.
- Host: GitHub
- URL: https://github.com/porter-dev/porter-preview-action
- Owner: porter-dev
- Created: 2021-12-06T16:26:32.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2024-06-14T20:50:56.000Z (almost 2 years ago)
- Last Synced: 2025-10-21T01:52:33.896Z (5 months ago)
- Language: Shell
- Size: 27.3 KB
- Stars: 0
- Watchers: 1
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# porter-preview-action
This Github action creates a new preview environment in Porter.
## Usage
```yaml
steps:
- name: Checkout code
uses: actions/checkout@v2.3.4
- name: Create Porter preview environment
uses: porter-dev/porter-preview-action@v0.1.0
with:
cluster: 1234
project: 4321
token: ${{ secrets.PORTER_TOKEN }}
namespace: pr-${{ github.event.pull_request.number }}
pr_id: ${{ github.event.pull_request.number }}
installation_id: 12344321
branch: ${{ github.head_ref }}
action_id: ${{ github.run_id }}
```
## Configuration Options
The possible inputs are:
- `token`: (string, required): Token for Porter authentication.
- `project`: (number, required): Project ID of Porter project.
- `cluster`: (number, required): Cluster ID of Porter cluster.
- `namespace`: (string, required): Namespace of the application (default "default")
- `pr_id`: (number, required): The ID of the pull request
- `installation_id`: (number, required): The installation ID for the Github app which manages preview envs
- `branch`: (string, required): the branch name of the source branch.
- `action_id`: the run id for Github actions, should be set automatically.
- `host`: (string, optional): Host URL of Porter instance. Set this if you use a self-hosted Porter instance.
- `file`: (string, optional): The path to the `porter.yaml` file (default "./porter.yaml").