Merge branch 'main' into next

This commit is contained in:
nocobase[bot] 2024-11-15 09:44:18 +00:00
commit 97358707f9

View File

@ -25,19 +25,21 @@ jobs:
- 4873:4873 - 4873:4873
steps: steps:
- name: Get pro plugins - name: Get pro plugins
id: get-pro-plugins id: get-info
run: | run: |
if [[ "${{ github.head_ref || github.ref_name }}" == "main" ]]; then if [[ "${{ github.head_ref || github.ref_name }}" == "main" ]]; then
echo "proRepos=$(echo '${{ vars.PRO_PLUGIN_REPOS }}')" >> $GITHUB_OUTPUT echo "proRepos=$(echo '${{ vars.PRO_PLUGIN_REPOS }}')" >> $GITHUB_OUTPUT
echo "branch=$(echo 'main')" >> $GITHUB_OUTPUT
else else
echo "proRepos=$(echo '${{ vars.NEXT_PRO_PLUGIN_REPOS }}')" >> $GITHUB_OUTPUT echo "proRepos=$(echo '${{ vars.NEXT_PRO_PLUGIN_REPOS }}')" >> $GITHUB_OUTPUT
echo "branch=$(echo 'next')" >> $GITHUB_OUTPUT
fi fi
- uses: actions/create-github-app-token@v1 - uses: actions/create-github-app-token@v1
id: app-token id: app-token
with: with:
app-id: ${{ vars.NOCOBASE_APP_ID }} app-id: ${{ vars.NOCOBASE_APP_ID }}
private-key: ${{ secrets.NOCOBASE_APP_PRIVATE_KEY }} private-key: ${{ secrets.NOCOBASE_APP_PRIVATE_KEY }}
repositories: nocobase,pro-plugins,${{ join(fromJSON(steps.get-pro-plugins.outputs.proRepos), ',') }} repositories: nocobase,pro-plugins,${{ join(fromJSON(steps.get-info.outputs.proRepos), ',') }}
skip-token-revoke: true skip-token-revoke: true
- name: Checkout - name: Checkout
uses: actions/checkout@v3 uses: actions/checkout@v3
@ -71,14 +73,14 @@ jobs:
- name: Clone pro repos - name: Clone pro repos
shell: bash shell: bash
run: | run: |
for repo in ${{ join(fromJSON(steps.get-pro-plugins.outputs.proRepos), ' ') }} for repo in ${{ join(fromJSON(steps.get-info.outputs.proRepos), ' ') }}
do do
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 git clone -b ${{ steps.get-info.outputs.branch }} https://x-access-token:${{ steps.app-token.outputs.token }}@github.com/nocobase/$repo.git packages/pro-plugins/@nocobase/$repo
done done
- name: rm .git - name: rm .git
run: | run: |
rm -rf packages/pro-plugins/.git rm -rf packages/pro-plugins/.git
for repo in ${{ join(fromJSON(steps.get-pro-plugins.outputs.proRepos), ' ') }} for repo in ${{ join(fromJSON(steps.get-info.outputs.proRepos), ' ') }}
do do
rm -rf packages/pro-plugins/@nocobase/$repo/.git rm -rf packages/pro-plugins/@nocobase/$repo/.git
done done