mirror of
https://github.com/nocobase/nocobase
synced 2024-11-15 11:26:55 +00:00
fix(ci): fix ci script error for pro (#4845)
* fix(ci): fix ci script error on pro * fix(ci): fix ci script * feat(ci): add base branch input for main repo * test(ci): test pr branch number * test(ci): test pr branch number
This commit is contained in:
parent
fb8ff62d01
commit
e4b3546583
13
.github/workflows/manual-build-pro-image.yml
vendored
13
.github/workflows/manual-build-pro-image.yml
vendored
@ -7,6 +7,10 @@ concurrency:
|
|||||||
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 a pull request number'
|
||||||
required: true
|
required: true
|
||||||
@ -24,14 +28,21 @@ jobs:
|
|||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v3
|
||||||
with:
|
with:
|
||||||
|
ref: ${{ github.event.inputs.base_branch }}
|
||||||
ssh-key: ${{ secrets.SUBMODULE_SSH_KEY }}
|
ssh-key: ${{ secrets.SUBMODULE_SSH_KEY }}
|
||||||
submodules: true
|
submodules: true
|
||||||
|
- name: Set PR branch
|
||||||
|
id: set_pro_pr_branch
|
||||||
|
if: inputs.pr_number != 'main'
|
||||||
|
run: echo "pr_branch=refs/pull/${{ github.event.inputs.pr_number }}/head" >> $GITHUB_OUTPUT
|
||||||
|
- name: Echo PR branch
|
||||||
|
run: echo "${{ steps.set_pro_pr_branch.outputs.pr_branch }}"
|
||||||
- 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: ${{ inputs.pr_number != 'main' && 'refs/pull/' + inputs.pr_number + '/head' || 'main' }}
|
ref: ${{ steps.set_pro_pr_branch.outputs.pr_branch || 'main' }}
|
||||||
ssh-key: ${{ secrets.SUBMODULE_SSH_KEY }}
|
ssh-key: ${{ secrets.SUBMODULE_SSH_KEY }}
|
||||||
- name: rm .git
|
- name: rm .git
|
||||||
run: rm -rf packages/pro-plugins/.git && git config --global user.email "you@example.com" && git config --global user.name "Your Name" && git add -A && git commit -m "tmp commit"
|
run: rm -rf packages/pro-plugins/.git && git config --global user.email "you@example.com" && git config --global user.name "Your Name" && git add -A && git commit -m "tmp commit"
|
||||||
|
Loading…
Reference in New Issue
Block a user