| # Licensed to the Apache Software Foundation (ASF) under one |
| # or more contributor license agreements. See the NOTICE file |
| # distributed with this work for additional information |
| # regarding copyright ownership. The ASF licenses this file |
| # to you under the Apache License, Version 2.0 (the |
| # "License"); you may not use this file except in compliance |
| # with the License. You may obtain a copy of the License at |
| # |
| # http://www.apache.org/licenses/LICENSE-2.0 |
| # |
| # Unless required by applicable law or agreed to in writing, |
| # software distributed under the License is distributed on an |
| # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY |
| # KIND, either express or implied. See the License for the |
| # specific language governing permissions and limitations |
| # under the License. |
| |
| name: Dubboctl UI Update |
| |
| on: |
| workflow_dispatch: |
| push: |
| branches: |
| - master |
| paths: |
| - .github/workflows/dubboctl-ui-update.yaml |
| - ui-vue3/** |
| - Makefile |
| # Trigger the workflow when a pull request is opened or updated. |
| # This is to make sure the build process would not be broken by the |
| # changes in the pull request. |
| pull_request: |
| branches: |
| - master |
| paths: |
| - .github/workflows/dubboctl-ui-update.yaml |
| - ui-vue3/** |
| - Makefile |
| |
| jobs: |
| lint: |
| runs-on: ubuntu-latest |
| defaults: |
| run: |
| working-directory: ui-vue3 |
| steps: |
| - uses: actions/checkout@v4 |
| |
| - name: Setup Node.js environment |
| uses: actions/setup-node@v4 |
| with: |
| node-version-file: "ui-vue3/.nvmrc" |
| |
| - name: Install dependencies |
| run: yarn --frozen-lockfile |
| |
| - name: Lint |
| run: | |
| # disable eslint for now as the new ui is under heavy development |
| # when the new ui is ready, we can enable eslint again (please also update the .lintstagedrc.json file) |
| # yarn lint |
| yarn prettier-check |
| |
| update-ui: |
| runs-on: ubuntu-latest |
| if: github.repository == 'apache/dubbo-kubernetes' |
| steps: |
| - uses: actions/checkout@v4 |
| |
| - name: Run Dubboctl UI build |
| run: make build-ui |
| |
| - name: Create PR if the build is changed |
| # This step will be skipped if the workflow is triggered by a pull request. |
| # As the build asset should only be updated when the main branch is updated. |
| if: github.event_name == 'push' || github.event_name == 'workflow_dispatch' |
| uses: peter-evans/create-pull-request@v5 |
| with: |
| commit-message: "[Dubboctl UI] Update build artifacts\n\nBuild commit: ${{ github.sha }}" |
| title: "[Dubboctl UI] Update build artifacts" |
| author: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> |
| body: "Dubboctl UI auto build commit: ${{ github.sha }}" |
| branch: github-actions/dubboctl-ui-update |