mirror of https://github.com/nocodb/nocodb
Wing-Kam Wong
3 years ago
3 changed files with 148 additions and 12 deletions
@ -0,0 +1,62 @@
|
||||
name: 'PR to master branch from develop' |
||||
|
||||
on: |
||||
# Triggered manually |
||||
workflow_dispatch: |
||||
inputs: |
||||
tag: |
||||
description: "Tag" |
||||
required: true |
||||
targetEnv: |
||||
description: "Target Environment" |
||||
required: true |
||||
type: choice |
||||
options: |
||||
- DEV |
||||
- PROD |
||||
# Triggered by release-nocodb.yml |
||||
workflow_call: |
||||
inputs: |
||||
tag: |
||||
description: "Tag" |
||||
required: true |
||||
type: string |
||||
targetEnv: |
||||
description: "Target Environment" |
||||
required: true |
||||
type: string |
||||
|
||||
jobs: |
||||
pr-to-master: |
||||
runs-on: ubuntu-latest |
||||
steps: |
||||
- run: | |
||||
echo 'triggering pr-to-master' |
||||
- name: Checkout |
||||
uses: actions/checkout@v2 |
||||
with: |
||||
ref: develop |
||||
|
||||
- name: Create Pull Request |
||||
if: ${{ github.event.inputs.targetEnv == 'PROD' || inputs.targetEnv == 'PROD' }} |
||||
id: cpr |
||||
uses: repo-sync/pull-request@v2 |
||||
env: |
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
||||
with: |
||||
source_branch: "develop" |
||||
destination_branch: "master" |
||||
pr_title: '${{ github.event.inputs.tag || inputs.tag }} Pre-release' |
||||
pr_label: 'Bot: Automated PR,Bot: Automerge' |
||||
- name: Check outputs |
||||
if: ${{ github.event.inputs.targetEnv == 'PROD' || inputs.targetEnv == 'PROD' }} |
||||
run: | |
||||
echo "Pull Request Number - ${{ steps.cpr.outputs.pr_number }}" |
||||
echo "Pull Request URL - ${{ steps.cpr.outputs.pr_url }}" |
||||
- name: automerge |
||||
if: ${{ github.event.inputs.targetEnv == 'PROD' || inputs.targetEnv == 'PROD' }} |
||||
uses: "pascalgn/automerge-action@v0.14.3" |
||||
env: |
||||
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}" |
||||
PULL_REQUEST: "${{ steps.cpr.outputs.pr_number }}" |
||||
MERGE_LABELS: "Bot: Automerge" |
@ -0,0 +1,23 @@
|
||||
name: 'Sync changes to master branch from develop' |
||||
|
||||
on: |
||||
# Triggered manually |
||||
workflow_dispatch: |
||||
# Triggered by release-nocodb.yml |
||||
workflow_call: |
||||
jobs: |
||||
sync-to-master: |
||||
runs-on: ubuntu-latest |
||||
steps: |
||||
- name: Checkout |
||||
uses: actions/checkout@v1 |
||||
|
||||
- name: Merge from develop to master |
||||
uses: wingkwong/gh-action-nightly-merge@master |
||||
with: |
||||
stable_branch: 'develop' |
||||
development_branch: 'master' |
||||
allow_ff: true |
||||
allow_forks: true |
||||
env: |
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
Loading…
Reference in new issue