Merge branch 'main' into next

This commit is contained in:
nocobase[bot] 2024-10-18 02:31:25 +00:00
commit 68cea3470e
3 changed files with 26 additions and 18 deletions

View File

@ -38,7 +38,7 @@ jobs:
uses: actions/checkout@v4 uses: actions/checkout@v4
with: with:
repository: nocobase/nocobase repository: nocobase/nocobase
ref: main ref: ${{ github.head_ref || github.ref_name }}
token: ${{ steps.app-token.outputs.token }} token: ${{ steps.app-token.outputs.token }}
persist-credentials: true persist-credentials: true
fetch-depth: 0 fetch-depth: 0
@ -47,6 +47,7 @@ jobs:
with: with:
repository: nocobase/pro-plugins repository: nocobase/pro-plugins
path: packages/pro-plugins path: packages/pro-plugins
ref: ${{ github.head_ref || github.ref_name }}
fetch-depth: 0 fetch-depth: 0
token: ${{ steps.app-token.outputs.token }} token: ${{ steps.app-token.outputs.token }}
persist-credentials: true persist-credentials: true
@ -55,7 +56,7 @@ jobs:
run: | run: |
for repo in ${{ join(fromJSON(vars.PRO_PLUGIN_REPOS), ' ') }} for repo in ${{ join(fromJSON(vars.PRO_PLUGIN_REPOS), ' ') }}
do do
git clone -b main https://x-access-token:${{ steps.app-token.outputs.token }}@github.com/nocobase/$repo.git packages/pro-plugins/@nocobase/$repo git clone -b ${{ github.head_ref || github.ref_name }} https://x-access-token:${{ steps.app-token.outputs.token }}@github.com/nocobase/$repo.git packages/pro-plugins/@nocobase/$repo
done done
- name: Set user - name: Set user
run: | run: |

View File

@ -1,19 +1,16 @@
name: Manual build pro image name: Manual build pro image
concurrency: concurrency:
group: ${{ github.workflow }}-${{ github.ref }} group: ${{ github.workflow }}-${{ github.ref }}-${{ github.event.inputs.pr_number }}-${{ github.event.inputs.nocobase_pr_number }}
cancel-in-progress: true cancel-in-progress: true
on: on:
workflow_dispatch: workflow_dispatch:
inputs: inputs:
base_branch:
description: 'Please enter a base branch for main repo'
required: true
default: 'main'
pr_number: pr_number:
description: 'Please enter a pull request number' description: 'Please enter the pr number of pro-plugins'
required: true nocobase_pr_number:
description: 'Please enter the pr number of nocobase/nocobase repository'
jobs: jobs:
build-and-push: build-and-push:
@ -43,22 +40,32 @@ jobs:
- name: Checkout - name: Checkout
uses: actions/checkout@v3 uses: actions/checkout@v3
with: with:
ref: ${{ github.event.inputs.base_branch }} ref: ${{ github.head_ref || github.ref_name }}
token: ${{ steps.app-token.outputs.token }} token: ${{ steps.app-token.outputs.token }}
submodules: true submodules: true
- name: Set PR branch - name: Checkout nocobase/nocobase pr
id: set_pro_pr_branch if: ${{ inputs.nocobase_pr_number != '' }}
if: inputs.pr_number != 'main' shell: bash
run: echo "pr_branch=refs/pull/${{ github.event.inputs.pr_number }}/head" >> $GITHUB_OUTPUT run: |
- name: Echo PR branch gh pr checkout ${{ inputs.nocobase_pr_number }}
run: echo "${{ steps.set_pro_pr_branch.outputs.pr_branch }}" env:
GITHUB_TOKEN: ${{ steps.app-token.outputs.token }}
- name: Checkout pro-plugins - name: Checkout pro-plugins
uses: actions/checkout@v3 uses: actions/checkout@v3
with: with:
repository: nocobase/pro-plugins repository: nocobase/pro-plugins
path: packages/pro-plugins path: packages/pro-plugins
ref: ${{ steps.set_pro_pr_branch.outputs.pr_branch || 'main' }} ref: ${{ github.head_ref || github.ref_name }}
token: ${{ steps.app-token.outputs.token }} token: ${{ steps.app-token.outputs.token }}
- name: Checkout pr
if: ${{ inputs.pr_number != '' }}
shell: bash
run: |
cd ./packages/pro-plugins/
gh pr checkout ${{ inputs.pr_number }}
cd ../../
env:
GITHUB_TOKEN: ${{ steps.app-token.outputs.token }}
- name: Clone pro repos - name: Clone pro repos
shell: bash shell: bash
run: | run: |

View File

@ -1,7 +1,7 @@
name: Build pro plugin docker image name: Build pro plugin docker image
concurrency: concurrency:
group: ${{ github.workflow }}-${{ github.ref }} group: ${{ github.workflow }}-${{ github.ref }}-${{ github.event.inputs.pro_plugin }}-${{ github.events.inputs.pr_number }}-${{ github.events.inputs.nocobase_pr_number }}
cancel-in-progress: true cancel-in-progress: true
on: on: