fix acess bug #14
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: build_nacos_client | |
| on: | |
| push: | |
| branches: | |
| - '**' | |
| paths: | |
| - .github/workflows/build_nacos_client.yml | |
| - build/nacos_client/** | |
| - build/common/* | |
| - Dockerfile | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| build_arch: [linux/amd64] | |
| include: | |
| - build_name: x86_64 | |
| build_arch: linux/amd64 | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| with: | |
| submodules: 'true' | |
| - name: clean to default | |
| run: sed -i 's/https:\/\/develop-agent.819819.xyz//g' ./build/nacos_client/frontend/api.ts | |
| - name: cat api.ts for check | |
| run: cat ./build/nacos_client/frontend/api.ts | |
| - name: Set up QEMU | |
| uses: docker/setup-qemu-action@v3 | |
| - name: Set up Docker Buildx | |
| uses: docker/setup-buildx-action@v3 | |
| - name: Build binary | |
| uses: docker/build-push-action@v5 | |
| with: | |
| context: build/nacos_client/ | |
| platforms: ${{ matrix.build_arch }} | |
| push: false | |
| tags: local_nacos_client:latest | |
| file: Dockerfile | |
| outputs: | | |
| type=local,dest=${{ github.workspace }}/output | |
| - name: List Dir | |
| run: ls -lRt ${{ github.workspace }} | |
| - name: Upload binary to artifacts | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: nacos_client-linux-${{ matrix.build_name }} | |
| path: ${{ github.workspace }}/output/build/install/* | |
| - name: Create Release | |
| uses: ncipollo/release-action@v1 | |
| with: | |
| tag: v1.0 | |
| name: "Release v1.0" | |
| artifacts: "${{ github.workspace }}/output/build/install/*" | |
| artifactErrorsFailBuild: false | |
| allowUpdates: true # 允许更新已存在的release | |
| token: ${{ secrets.GITHUB_TOKEN }} |