diff --git a/.github/actions/get-view/action.yml b/.github/actions/get-view/action.yml new file mode 100644 index 00000000..12270188 --- /dev/null +++ b/.github/actions/get-view/action.yml @@ -0,0 +1,17 @@ +name: Reusable Workflow + +on: + workflow_call: + inputs: + tag: + type: string + +jobs: + pull: + runs-on: ubuntu-latest + steps: + - run: mkdir view && cd view + - run: wget https://github.com/metrico/qryn-view/releases/download/$TAG/dist.zip + env: + TAG: ${{ inputs.tag }} + - run: unzip dist.zip && rm dist.zip diff --git a/.github/workflows/build-view.yml b/.github/workflows/build-view.yml deleted file mode 100644 index 03716552..00000000 --- a/.github/workflows/build-view.yml +++ /dev/null @@ -1,32 +0,0 @@ -name: Reusable Workflow - -on: - workflow_call: - inputs: - node_version: - type: string - -jobs: - reusable_job: - runs-on: ubuntu-latest - outputs: - job_output: ${{ steps.set_output.outputs.step_output }} - steps: - - name: Use Node.js ${{ inputs.node_version }} - uses: actions/setup-node@v4.0.1 - with: - node-version: ${{ inputs.node_version }} - cache: "pnpm" - - - run: git submodule init && git submodule update - - - run: cd view/qryn-view - - - name: Install dependencies - run: pnpm install - - - name: Build - run: pnpm build - - - name: cleanup - run: cd .. && mv qryn-view/packages/main/dist/* . && rm -rf qryn-view diff --git a/.github/workflows/build_release.yml b/.github/workflows/build_release.yml index 8b712e51..d44d7d6f 100644 --- a/.github/workflows/build_release.yml +++ b/.github/workflows/build_release.yml @@ -35,9 +35,9 @@ jobs: with: node-version: 18 - name: build qryn-view - uses: ./.github/workflows/build-view.yml + uses: ./.github/actions/get-view with: - node_version: 18 + tag: v3.3.2 - name: Publish to NPM if: ${{ steps.checksecrets.outputs.secretspresent }} continue-on-error: true @@ -70,9 +70,9 @@ jobs: env: SECRET: ${{ secrets.DOCKERHUB_TOKEN }} - name: build qryn-view - uses: ./.github/workflows/build-view.yml + uses: ./.github/actions/get-view with: - node_version: 18 + tag: v3.3.2 - name: Set up Docker QEMU if: ${{ steps.checkdocker.outputs.secretspresent }} uses: docker/setup-qemu-action@v3.0.0 @@ -145,9 +145,9 @@ jobs: env: SECRET: ${{ secrets.DOCKERHUB_TOKEN }} - name: build qryn-view - uses: ./.github/workflows/build-view.yml + uses: ./.github/actions/get-view with: - node_version: 18 + tag: v3.3.2 - name: Set up Docker QEMU if: ${{ steps.checkdocker.outputs.secretspresent }} uses: docker/setup-qemu-action@v3.0.0 diff --git a/.github/workflows/node-clickhouse.js.yml b/.github/workflows/node-clickhouse.js.yml index fb90603f..e7b34625 100644 --- a/.github/workflows/node-clickhouse.js.yml +++ b/.github/workflows/node-clickhouse.js.yml @@ -42,9 +42,9 @@ jobs: node-version: ${{ matrix.node-version }} cache: 'npm' - name: build qryn-view - uses: ./.github/workflows/build-view.yml + uses: ./.github/actions/get-view with: - node_version: ${{ matrix.node-version }} + tag: v3.3.2 - run: npm install - run: npm run postinstall - run: git submodule init