docs(self-managed): Update sm guides and supported environments #122
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: preview-env-teardown | |
on: | |
pull_request: | |
types: [unlabeled, closed] | |
jobs: | |
tear-down-preview-env: | |
if: github.event.label.name == 'deploy' || (github.event.action == 'closed' && contains( github.event.pull_request.labels.*.name, 'deploy')) | |
runs-on: ubuntu-22.04 | |
timeout-minutes: 20 | |
name: teardown-preview-env | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Import secrets | |
id: secrets | |
uses: hashicorp/vault-action@d1720f055e0635fd932a1d2a48f87a666a57906c | |
with: | |
url: ${{ secrets.VAULT_ADDR }} | |
method: approle | |
roleId: ${{ secrets.VAULT_ROLE_ID }} | |
secretId: ${{ secrets.VAULT_SECRET_ID }} | |
secrets: | | |
secret/data/products/camunda-docs/ci/preview-environment PREVIEW_ENV_BUCKET_NAME; | |
secret/data/products/camunda-docs/ci/preview-environment PREVIEW_ENV_GCLOUD_SA_KEY; | |
- name: Authenticate with Google Cloud | |
uses: google-github-actions/auth@v2 | |
with: | |
credentials_json: ${{ steps.secrets.outputs.PREVIEW_ENV_GCLOUD_SA_KEY }} | |
- name: Find deployment status comment | |
uses: peter-evans/find-comment@v3 | |
id: find-comment | |
with: | |
issue-number: ${{ github.event.number }} | |
body-includes: <!-- preview-env --> | |
- name: Update comment with tear-down warning | |
if: steps.find-comment.outputs.comment-id != '' | |
uses: peter-evans/create-or-update-comment@v4 | |
with: | |
comment-id: ${{ steps.find-comment.outputs.comment-id }} | |
body: | | |
:warning: Preview environment for commit ${{ github.sha }} is being deleted. This usually takes 2-3 minutes. <!-- preview-env --> | |
edit-mode: replace | |
- name: Set up Cloud SDK | |
uses: google-github-actions/setup-gcloud@v2 | |
- name: Remove files from Google bucket | |
env: | |
BUCKET_NAME: ${{ steps.secrets.outputs.PREVIEW_ENV_BUCKET_NAME }} | |
run: | | |
gsutil -m rm -r gs://$BUCKET_NAME/pr-${{ github.event.number }}/ | |
- uses: bobheadxi/deployments@v1 | |
if: always() | |
name: Deactivate GitHub Deployment environment | |
with: | |
step: deactivate-env | |
token: ${{ github.token }} | |
env: ${{ github.event.repository.name }} | |
ref: ${{ github.event.pull_request.head.sha }} | |
- name: Update comment with tear-down status | |
if: steps.find-comment.outputs.comment-id != '' | |
uses: peter-evans/create-or-update-comment@v4 | |
with: | |
comment-id: ${{ steps.find-comment.outputs.comment-id }} | |
body: | | |
:broom: Preview environment for this PR has been torn down. <!-- preview-env --> | |
edit-mode: replace |