Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/uffizzicloud/delete-preview-action
GitHub Action to delete a preview generated by the Uffizzi engine
https://github.com/uffizzicloud/delete-preview-action
Last synced: 13 days ago
JSON representation
GitHub Action to delete a preview generated by the Uffizzi engine
- Host: GitHub
- URL: https://github.com/uffizzicloud/delete-preview-action
- Owner: UffizziCloud
- Created: 2022-04-12T01:44:20.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2023-07-05T14:22:56.000Z (over 1 year ago)
- Last Synced: 2024-12-08T23:32:59.612Z (14 days ago)
- Homepage:
- Size: 11.7 KB
- Stars: 4
- Watchers: 5
- Forks: 1
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Delete Full-Stack Preview Environment on K8s
Uses Open Source Uffizzi CLI `uffizzi preview delete` to delete on-demand, ephemeral test environment deployed onto your Kubernetes cluster.
## Inputs
### `id`
**Required** Deployment ID string
### `username`
Uffizzi username
### `project`
Uffizzi project slug
### `request-token`
Access token obtained from the GHA pipeline available as `ACTIONS_RUNTIME_TOKEN` in the pipeline environment. See example below.
### `request-token_url`
URL where the pipeline OIDC token can be requested from available as `ACTIONS_ID_TOKEN_REQUEST_URL` in the pipeline environment. See example below.
### `server`
URL of your Uffizzi installation
### `password`
Your Uffizzi password. Specify a GitHub Encrypted Secret and use it! See example below.
## Example usage
### Email and password login```yaml
uses: UffizziCloud/delete-preview-action@v1
with:
id: 'deployment-23'
username: '[email protected]'
server: 'https://app.uffizzi.com'
project: 'default'
password: ${{ secrets.UFFIZZI_PASSWORD }}
```### OIDC token login
```yaml
delete-preview:
name: "Delete Preview on Uffizzi"
runs-on: ubuntu-20.04
steps:
- uses: actions/github-script@v6
id: ci-job-token
with:
script: |
const token = process.env['ACTIONS_RUNTIME_TOKEN']
const runtimeUrl = process.env['ACTIONS_ID_TOKEN_REQUEST_URL']
core.setOutput('request-token', token.trim())
core.setOutput('request-token-url', runtimeUrl.trim())
- uses: UffizziCloud/delete-preview-action@v1
with:
server: 'https://app.uffizzi.com'
request-token: ${{ steps.ci-job-token.outputs.request-token }}
request-token-url: ${{ steps.ci-job-token.outputs.request-token-url }}
preview-id: 1
permissions:
id-token: write
```