34 lines
1.1 KiB
YAML
34 lines
1.1 KiB
YAML
name: 'Preview Environment Dispatch'
|
|
|
|
on:
|
|
pull_request:
|
|
types: [opened, synchronize, reopened, labeled]
|
|
|
|
concurrency:
|
|
group: ${{ github.workflow }}-${{ github.ref }}
|
|
cancel-in-progress: true
|
|
|
|
jobs:
|
|
changed-files-check:
|
|
uses: ./.github/workflows/changed-files.yaml
|
|
with:
|
|
files: |
|
|
.github/workflows/preview-env-dispatch.yaml
|
|
.github/workflows/preview-env-keepalive.yaml
|
|
packages/twenty-docker/**
|
|
docker-compose.yml
|
|
packages/twenty-server/**
|
|
packages/twenty-front/**
|
|
|
|
trigger-preview:
|
|
needs: changed-files-check
|
|
if: needs.changed-files-check.outputs.any_changed == 'true' || contains(github.event.pull_request.labels.*.name, 'preview')
|
|
timeout-minutes: 5
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Trigger preview environment workflow
|
|
uses: benc-uk/workflow-dispatch@v1
|
|
with:
|
|
workflow: preview-env-keepalive.yaml
|
|
token: ${{ secrets.GITHUB_TOKEN }}
|
|
inputs: '{"pr_number": "${{ github.event.pull_request.number }}", "pr_head_sha": "${{ github.event.pull_request.head.sha }}", "repo_full_name": "${{ github.repository }}"}' |