2023-08-24 16:51:46 +02:00
|
|
|
name: deploy-featurebranch
|
|
|
|
|
|
|
|
on:
|
|
|
|
pull_request:
|
2024-10-14 10:47:15 +02:00
|
|
|
types:
|
|
|
|
- labeled
|
|
|
|
- opened
|
|
|
|
- synchronize
|
|
|
|
- reopened
|
2023-08-24 16:51:46 +02:00
|
|
|
|
|
|
|
jobs:
|
|
|
|
release:
|
2023-12-14 10:48:57 +01:00
|
|
|
if: |
|
2023-12-14 10:52:29 +01:00
|
|
|
(github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == 'Budibase/budibase') &&
|
2024-10-11 16:29:09 +02:00
|
|
|
(
|
|
|
|
contains(github.event.pull_request.labels.*.name, 'feature-branch') ||
|
|
|
|
contains(github.event.pull_request.labels.*.name, 'feature-branch-pro') ||
|
|
|
|
contains(github.event.pull_request.labels.*.name, 'feature-branch-team') ||
|
|
|
|
contains(github.event.pull_request.labels.*.name, 'feature-branch-business') ||
|
|
|
|
contains(github.event.pull_request.labels.*.name, 'feature-branch-enterprise')
|
|
|
|
)
|
2023-08-24 16:51:46 +02:00
|
|
|
runs-on: ubuntu-latest
|
2024-10-14 10:47:15 +02:00
|
|
|
env:
|
|
|
|
PAYLOAD_BRANCH: ${{ github.head_ref }}
|
|
|
|
PAYLOAD_PR_NUMBER: ${{ github.event.pull_request.number }}
|
|
|
|
PAYLOAD_LICENSE_TYPE: |
|
|
|
|
${{
|
|
|
|
contains(github.event.pull_request.labels.*.name, 'feature-branch') && 'free' ||
|
|
|
|
contains(github.event.pull_request.labels.*.name, 'feature-branch-pro') && 'pro' ||
|
|
|
|
contains(github.event.pull_request.labels.*.name, 'feature-branch-team') && 'team' ||
|
|
|
|
contains(github.event.pull_request.labels.*.name, 'feature-branch-business') && 'business' ||
|
|
|
|
contains(github.event.pull_request.labels.*.name, 'feature-branch-enterprise') && 'enterprise' || 'free'
|
|
|
|
}}
|
2023-08-24 16:51:46 +02:00
|
|
|
steps:
|
2024-01-25 09:15:37 +01:00
|
|
|
- uses: actions/checkout@v4
|
2024-10-11 16:29:09 +02:00
|
|
|
|
2023-08-24 16:51:46 +02:00
|
|
|
- uses: passeidireto/trigger-external-workflow-action@main
|
|
|
|
with:
|
|
|
|
repository: budibase/budibase-deploys
|
|
|
|
event: featurebranch-qa-deploy
|
|
|
|
github_pat: ${{ secrets.GH_ACCESS_TOKEN }}
|