mirror of
https://github.com/nocobase/nocobase
synced 2024-11-15 08:08:32 +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:
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
base_branch:
|
||||
description: 'Please enter a base branch for main repo'
|
||||
required: true
|
||||
default: 'main'
|
||||
pr_number:
|
||||
description: 'Please enter a pull request number'
|
||||
required: true
|
||||
@ -24,14 +28,21 @@ jobs:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
ref: ${{ github.event.inputs.base_branch }}
|
||||
ssh-key: ${{ secrets.SUBMODULE_SSH_KEY }}
|
||||
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
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
repository: nocobase/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 }}
|
||||
- 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"
|
||||
|
Loading…
Reference in New Issue
Block a user