Uses Open Source Uffizzi CLI uffizzi preview delete
to delete on-demand, ephemeral test environment deployed onto your Kubernetes cluster.
Required Deployment ID string
Uffizzi username
Uffizzi project slug
Access token obtained from the GHA pipeline available as ACTIONS_RUNTIME_TOKEN
in the pipeline environment. See example below.
URL where the pipeline OIDC token can be requested from available as ACTIONS_ID_TOKEN_REQUEST_URL
in the pipeline environment. See example below.
URL of your Uffizzi installation
Your Uffizzi password. Specify a GitHub Encrypted Secret and use it! See example below.
uses: UffizziCloud/delete-preview-action@v1
with:
id: 'deployment-23'
username: '[email protected]'
server: 'https://app.uffizzi.com'
project: 'default'
password: ${{ secrets.UFFIZZI_PASSWORD }}
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