fix: ref_name

This commit is contained in:
chenos 2025-04-18 14:34:11 +08:00
parent a7cefd42d6
commit b170c286f6

View File

@ -5,7 +5,10 @@ concurrency:
cancel-in-progress: true
on:
push:
workflow_dispatch:
inputs:
ref_name:
description: 'Branch or tag name to release'
jobs:
get-plugins:
@ -28,10 +31,10 @@ jobs:
id: get-info
shell: bash
run: |
if [[ "${{ github.ref_name }}" =~ "beta" ]]; then
if [[ "${{ inputs.ref_name || github.ref_name }}" =~ "beta" ]]; then
echo "defaultTag=$(echo 'beta')" >> $GITHUB_OUTPUT
echo "proRepos=$(echo '${{ needs.get-plugins.outputs.beta-plugins }}')" >> $GITHUB_OUTPUT
elif [[ "${{ github.ref_name }}" =~ "alpha" ]]; then
elif [[ "${{ inputs.ref_name || github.ref_name }}" =~ "alpha" ]]; then
echo "defaultTag=$(echo 'alpha')" >> $GITHUB_OUTPUT
echo "proRepos=$(echo '${{ needs.get-plugins.outputs.alpha-plugins }}')" >> $GITHUB_OUTPUT
else
@ -49,7 +52,7 @@ jobs:
- name: Checkout
uses: actions/checkout@v3
with:
ref: ${{ github.ref_name }}
ref: ${{ inputs.ref_name || github.ref_name }}
- name: yarn install
run: |
yarn install
@ -58,14 +61,14 @@ jobs:
with:
repository: nocobase/pro-plugins
path: packages/pro-plugins
ref: ${{ github.ref_name }}
ref: ${{ inputs.ref_name || github.ref_name }}
token: ${{ steps.app-token.outputs.token }}
- name: Clone pro repos
shell: bash
run: |
for repo in ${{ join(fromJSON(steps.get-info.outputs.proRepos), ' ') }} ${{ join(fromJSON(needs.get-plugins.outputs.custom-plugins), ' ') }}
do
git clone -b ${{ 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 ${{ inputs.ref_name || github.ref_name }} https://x-access-token:${{ steps.app-token.outputs.token }}@github.com/nocobase/$repo.git packages/pro-plugins/@nocobase/$repo
done
- name: Set up QEMU
uses: docker/setup-qemu-action@v2