From e1a86538040b0ea20acfa943e8fed2cb1537c884 Mon Sep 17 00:00:00 2001 From: Wing-Kam Wong Date: Fri, 29 Apr 2022 13:38:53 +0800 Subject: [PATCH 1/2] enhancement: add sdk path after release --- .github/workflows/release-nocodb.yml | 7 +++- .github/workflows/update-sdk-path.yml | 47 +++++++++++++++++++++++++++ 2 files changed, 53 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/update-sdk-path.yml diff --git a/.github/workflows/release-nocodb.yml b/.github/workflows/release-nocodb.yml index 927caaf8d9..df577e76c0 100644 --- a/.github/workflows/release-nocodb.yml +++ b/.github/workflows/release-nocodb.yml @@ -104,7 +104,12 @@ jobs: DOCKERHUB_USERNAME: "${{ secrets.DOCKERHUB_USERNAME }}" DOCKERHUB_TOKEN: "${{ secrets.DOCKERHUB_TOKEN }}" + # Change nocodb-sdk back to local path + update-sdk-path: + needs: release-docker + uses: ./.github/workflows/update-sdk-path.yml + # Sync changes to develop sync-to-develop: - needs: release-docker + needs: update-sdk-path uses: ./.github/workflows/sync-to-develop.yml diff --git a/.github/workflows/update-sdk-path.yml b/.github/workflows/update-sdk-path.yml new file mode 100644 index 0000000000..f15fbeabbc --- /dev/null +++ b/.github/workflows/update-sdk-path.yml @@ -0,0 +1,47 @@ +name: "Update SDK Path" + +on: + # Triggered manually + workflow_dispatch: + # Triggered by release-nocodb.yml + workflow_call: +jobs: + release: + runs-on: ubuntu-latest + strategy: + matrix: + node-version: [14] + steps: + - name: Checkout + uses: actions/checkout@v2 + + - run: | + cd packages/nocodb + npm install --save --save-exact nocodb-sdk@file:../nocodb-sdk + cd ../.. + cd packages/nc-gui + npm install --save --save-exact nocodb-sdk@file:../nocodb-sdk + + - name: Create Pull Request + id: cpr + uses: peter-evans/create-pull-request@v3 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + signoff: true + branch: 'bot/update-nocodb-sdk-path' + delete-branch: true + title: 'Update nocodb-sdk to local path' + labels: | + Bot: Automated PR + Bot: Automerge + - name: Check outputs + run: | + echo "Pull Request Number - ${{ steps.cpr.outputs.pull-request-number }}" + echo "Pull Request URL - ${{ steps.cpr.outputs.pull-request-url }}" + - name: automerge + uses: "pascalgn/automerge-action@v0.14.3" + env: + GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}" + PULL_REQUEST: "${{ steps.cpr.outputs.pull-request-number }}" + MERGE_LABELS: "Bot: Automerge" From 954814eda53470611f0e41b20dbb6d2b8d314cef Mon Sep 17 00:00:00 2001 From: Wing-Kam Wong Date: Fri, 29 Apr 2022 13:41:00 +0800 Subject: [PATCH 2/2] refactor: rm targetEng option --- .github/workflows/release-nightly-dev.yml | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/.github/workflows/release-nightly-dev.yml b/.github/workflows/release-nightly-dev.yml index 45c6574527..ca49c1a613 100644 --- a/.github/workflows/release-nightly-dev.yml +++ b/.github/workflows/release-nightly-dev.yml @@ -3,14 +3,6 @@ name: 'NocoDB Nightly Dev Release' on: # Triggered manually workflow_dispatch: - inputs: - targetEnv: - description: "Target Environment" - required: true - type: choice - options: - - DEV - # - PROD schedule: # every 6 hours - cron: '0 */6 * * *' @@ -54,7 +46,7 @@ jobs: uses: ./.github/workflows/release-npm.yml with: tag: ${{ needs.set-tag.outputs.nightly_build_tag }} - targetEnv: ${{ github.event.inputs.targetEnv || 'DEV' }} + targetEnv: 'DEV' secrets: NPM_TOKEN: "${{ secrets.NPM_TOKEN }}" @@ -65,7 +57,7 @@ jobs: with: currentVersion: ${{ needs.set-tag.outputs.current_version }} tag: ${{ needs.set-tag.outputs.nightly_build_tag }} - targetEnv: ${{ github.event.inputs.targetEnv || 'DEV' }} + targetEnv: 'DEV' isDaily: ${{ needs.set-tag.outputs.is_daily }} secrets: DOCKERHUB_USERNAME: "${{ secrets.DOCKERHUB_USERNAME }}"