Skip to content

fix(generator): standardize line endings in generated element templates #298

fix(generator): standardize line endings in generated element templates

fix(generator): standardize line endings in generated element templates #298

---
name: preview-env-teardown
on:
pull_request:
types: [ unlabeled,closed ]
jobs:
teardown-preview:
# check whether the unlabel name was deploy-preview || check whether the PR was closed / merged and whether deploy-preview was part of the array
if: github.event.label.name == 'deploy-preview' || (github.event.action == 'closed' && contains( github.event.pull_request.labels.*.name, 'deploy-preview') )
runs-on: ubuntu-22.04
timeout-minutes: 20
env:
BRANCH_NAME: ${{ github.head_ref }} # head_ref = branch on PR
strategy:
fail-fast: false # Don't disrupt other deployments because of failure
matrix:
product_context: [c8sm]
steps:
#########################################################################
# Sanitize the branch name to remove dependabot/,renovate/ and transform the name
- id: sanitize
uses: camunda/infra-global-github-actions/sanitize-branch-name@main
with:
branch: ${{ env.BRANCH_NAME }}
max_length: '15'
#########################################################################
# Setup: import secrets from vault
- name: Import secrets
id: secrets
uses: hashicorp/vault-action@d1720f055e0635fd932a1d2a48f87a666a57906c # v3.0.0
with:
url: ${{ secrets.VAULT_ADDR }}
method: approle
roleId: ${{ secrets.VAULT_ROLE_ID }}
secretId: ${{ secrets.VAULT_SECRET_ID }}
secrets: |
secret/data/products/connectors/ci/common ARGOCD_TOKEN;
#########################################################################
# Setup: checkout code. This is required because we are using
# composite actions and deployment manifests.
- name: Checkout
uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v4.1.2
#########################################################################
# Tear down preview environment
- name: Tear down Preview Environment for ${{ matrix.product_context }}
uses: camunda/infra-global-github-actions/preview-env/destroy@main
with:
revision: ${{ env.BRANCH_NAME }}
argocd_token: ${{ steps.secrets.outputs.ARGOCD_TOKEN }}
app_name: connectors-${{ steps.sanitize.outputs.branch_name }}-${{ matrix.product_context }}
clean:
if: always() && needs.teardown-preview.result != 'skipped'
uses: camunda/connectors/.github/workflows/PREVIEW-ENV-CLEAN.yml@main
needs: [teardown-preview]
secrets: inherit
with:
pull-request: ${{ github.event.pull_request.number }}