Merge branch 'master' into fix/any-filter
This commit is contained in:
commit
a7d11a142a
|
@ -3,26 +3,50 @@ name: deploy-featurebranch
|
||||||
on:
|
on:
|
||||||
pull_request:
|
pull_request:
|
||||||
types: [
|
types: [
|
||||||
labeled,
|
labeled,
|
||||||
# default types below (https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#pull_request)
|
# default types below (https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#pull_request)
|
||||||
opened,
|
opened,
|
||||||
synchronize,
|
synchronize,
|
||||||
reopened,
|
reopened,
|
||||||
]
|
]
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
release:
|
release:
|
||||||
if: |
|
if: |
|
||||||
(github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == 'Budibase/budibase') &&
|
(github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == 'Budibase/budibase') &&
|
||||||
contains(github.event.pull_request.labels.*.name, 'feature-branch')
|
(
|
||||||
|
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')
|
||||||
|
)
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- name: Set PAYLOAD_LICENSE_TYPE
|
||||||
|
id: set_license_type
|
||||||
|
run: |
|
||||||
|
if [[ "${{ contains(github.event.pull_request.labels.*.name, 'feature-branch') }}" == "true" ]]; then
|
||||||
|
echo "PAYLOAD_LICENSE_TYPE=free" >> $GITHUB_ENV
|
||||||
|
elif [[ "${{ contains(github.event.pull_request.labels.*.name, 'feature-branch-pro') }}" == "true" ]]; then
|
||||||
|
echo "PAYLOAD_LICENSE_TYPE=pro" >> $GITHUB_ENV
|
||||||
|
elif [[ "${{ contains(github.event.pull_request.labels.*.name, 'feature-branch-team') }}" == "true" ]]; then
|
||||||
|
echo "PAYLOAD_LICENSE_TYPE=team" >> $GITHUB_ENV
|
||||||
|
elif [[ "${{ contains(github.event.pull_request.labels.*.name, 'feature-branch-business') }}" == "true" ]]; then
|
||||||
|
echo "PAYLOAD_LICENSE_TYPE=business" >> $GITHUB_ENV
|
||||||
|
elif [[ "${{ contains(github.event.pull_request.labels.*.name, 'feature-branch-enterprise') }}" == "true" ]]; then
|
||||||
|
echo "PAYLOAD_LICENSE_TYPE=enterprise" >> $GITHUB_ENV
|
||||||
|
else
|
||||||
|
echo "PAYLOAD_LICENSE_TYPE=free" >> $GITHUB_ENV
|
||||||
|
fi
|
||||||
|
|
||||||
- uses: passeidireto/trigger-external-workflow-action@main
|
- uses: passeidireto/trigger-external-workflow-action@main
|
||||||
env:
|
env:
|
||||||
PAYLOAD_BRANCH: ${{ github.head_ref }}
|
PAYLOAD_BRANCH: ${{ github.head_ref }}
|
||||||
PAYLOAD_PR_NUMBER: ${{ github.event.pull_request.number }}
|
PAYLOAD_PR_NUMBER: ${{ github.event.pull_request.number }}
|
||||||
PAYLOAD_LICENSE_TYPE: "free"
|
PAYLOAD_LICENSE_TYPE: ${{ env.PAYLOAD_LICENSE_TYPE }}
|
||||||
with:
|
with:
|
||||||
repository: budibase/budibase-deploys
|
repository: budibase/budibase-deploys
|
||||||
event: featurebranch-qa-deploy
|
event: featurebranch-qa-deploy
|
||||||
|
|
Loading…
Reference in New Issue