From 20845087e5127cb4109aa190e42ecaefef0e8beb Mon Sep 17 00:00:00 2001 From: George <58841610+Shinji-IkariG@users.noreply.github.com> Date: Mon, 23 Sep 2024 15:02:27 +0800 Subject: [PATCH] Update workflow (#5942) * Update release.yml * Update rc.yml * Update pull_request.yml * Update nightly.yml * Update auto_cherry_pick.yml * Update auto_cherry_pick.yml * Update auto_cherry_pick.yml * Update auto_cherry_pick.yml * Update nightly.yml * Update pull_request.yml * Update auto_cherry_pick.yml --- .github/workflows/auto_cherry_pick.yml | 13 +++---- .github/workflows/nightly.yml | 50 +++++++++++++------------- .github/workflows/pull_request.yml | 14 ++++---- .github/workflows/rc.yml | 36 +++++++++---------- .github/workflows/release.yml | 13 ++++--- 5 files changed, 62 insertions(+), 64 deletions(-) diff --git a/.github/workflows/auto_cherry_pick.yml b/.github/workflows/auto_cherry_pick.yml index 2b20f18e9e7..19832b1a188 100644 --- a/.github/workflows/auto_cherry_pick.yml +++ b/.github/workflows/auto_cherry_pick.yml @@ -13,16 +13,11 @@ defaults: jobs: auto-cherry-pick: #if: ${{ startsWith(github.event.pull_request.labels.*.name, 'cherry-pick-') && github.event.pull_request.merged == true }} - runs-on: [self-hosted, nebula-fast] - container: - image: reg.vesoft-inc.com/dashboard/dashboard-dev:centos7 - credentials: - username: ${{ secrets.HARBOR_USERNAME }} - password: ${{ secrets.HARBOR_PASSWORD }} + runs-on: ubuntu-latest steps: - - name: keep workspace empty - run: | - rm -rf * + - uses: actions/setup-python@v5 + with: + python-version: '3.8' - name: git config set env: GH_BOT_PAT: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/nightly.yml b/.github/workflows/nightly.yml index db0f7a437c0..b65b971a8e1 100644 --- a/.github/workflows/nightly.yml +++ b/.github/workflows/nightly.yml @@ -17,7 +17,7 @@ env: jobs: package: name: build package - runs-on: [self-hosted, nebula] + runs-on: [self-hosted, nebula, linux] strategy: fail-fast: false matrix: @@ -31,11 +31,11 @@ jobs: container: image: vesoft/nebula-dev:${{ matrix.os }} steps: - - uses: webiny/action-post-run@3.0.0 + - uses: webiny/action-post-run@3.1.0 with: run: sh -c "find . -mindepth 1 -delete" - - uses: actions/checkout@v3 - - uses: actions/setup-go@v4 + - uses: actions/checkout@v4 + - uses: actions/setup-go@v5 with: go-version: "^1.16.7" - name: package @@ -48,7 +48,7 @@ jobs: find pkg-build/cpack_output -type f \( -iname \*.deb -o -iname \*.rpm -o -iname \*.tar.gz \) -exec bash -c "sha256sum {} > {}.sha256sum.txt" \; subdir=$(date -u +%Y.%m.%d) echo "subdir=$subdir" >> $GITHUB_OUTPUT - # - uses: actions/upload-artifact@v3 + # - uses: actions/upload-artifact@v4 # with: # name: ${{ matrix.os }}-nightly # path: pkg-build/cpack_output @@ -64,19 +64,19 @@ jobs: docker: name: build docker image needs: package - runs-on: [self-hosted, nebula] + runs-on: [self-hosted, nebula, linux] steps: - - uses: webiny/action-post-run@3.0.0 + - uses: webiny/action-post-run@3.1.0 with: run: sh -c "find . -mindepth 1 -delete" - - uses: actions/checkout@v3 - - uses: docker/login-action@v2 + - uses: actions/checkout@v4 + - uses: docker/login-action@v3 with: username: ${{ secrets.DOCKER_USERNAME }} password: ${{ secrets.DOCKER_PASSWORD }} - - uses: docker/setup-qemu-action@v2 - - uses: docker/setup-buildx-action@v2 - - uses: docker/build-push-action@v4 + - uses: docker/setup-qemu-action@v3 + - uses: docker/setup-buildx-action@v3 + - uses: docker/build-push-action@v6 with: context: . file: ./docker/Dockerfile @@ -86,7 +86,7 @@ jobs: target: graphd cache-to: type=local,dest=/tmp/buildx-cache,mode=max push: true - - uses: docker/build-push-action@v4 + - uses: docker/build-push-action@v6 with: context: . file: ./docker/Dockerfile @@ -96,7 +96,7 @@ jobs: target: storaged cache-from: type=local,src=/tmp/buildx-cache push: true - - uses: docker/build-push-action@v4 + - uses: docker/build-push-action@v6 with: context: . file: ./docker/Dockerfile @@ -106,7 +106,7 @@ jobs: target: metad cache-from: type=local,src=/tmp/buildx-cache push: true - - uses: docker/build-push-action@v4 + - uses: docker/build-push-action@v6 with: context: . file: ./docker/Dockerfile @@ -122,7 +122,7 @@ jobs: coverage: name: coverage - runs-on: [self-hosted, nebula] + runs-on: [self-hosted, nebula, linux] strategy: fail-fast: false matrix: @@ -139,10 +139,10 @@ jobs: - /tmp/ccache/nebula/${{ matrix.os }}-${{ matrix.compiler }}:/tmp/ccache/nebula/${{ matrix.os }}-${{ matrix.compiler }} options: --cap-add=SYS_PTRACE steps: - - uses: webiny/action-post-run@3.0.0 + - uses: webiny/action-post-run@3.1.0 with: run: sh -c "find . -mindepth 1 -delete" - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Prepare environment run: | [ -d build/ ] && rm -rf build/* || mkdir -p build @@ -197,7 +197,7 @@ jobs: files: fastcov.info fail_ci_if_error: false - name: Upload logs - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 if: ${{ failure() }} with: name: ${{ matrix.os }}-${{ matrix.compiler }}-nebula-test-logs @@ -235,10 +235,10 @@ jobs: --health-timeout 5s --health-retries 10 steps: - - uses: webiny/action-post-run@3.0.0 + - uses: webiny/action-post-run@3.1.0 with: run: sh -c "find . -mindepth 1 -delete" - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: output some vars id: vars env: @@ -304,7 +304,7 @@ jobs: working-directory: tests/ timeout-minutes: 2 - name: Upload logs - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 if: ${{ failure() }} with: name: ${{ matrix.os }}-${{ matrix.compiler }}-nebula-test-logs @@ -329,10 +329,10 @@ jobs: - /tmp/ccache/nebula/${{ matrix.os }}-${{ matrix.compiler }}:/tmp/ccache/nebula/${{ matrix.os }}-${{ matrix.compiler }} options: --cap-add=SYS_PTRACE steps: - - uses: webiny/action-post-run@3.0.0 + - uses: webiny/action-post-run@3.1.0 with: run: sh -c "find . -mindepth 1 -delete" - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Prepare environment id: prepare run: | @@ -394,7 +394,7 @@ jobs: working-directory: tests/ timeout-minutes: 2 - name: Upload logs - uses: actions/upload-artifact@v2 + uses: actions/upload-artifact@v4 if: ${{ failure() }} with: name: ${{ matrix.os }}-${{ matrix.compiler }}-nebula-test-logs diff --git a/.github/workflows/pull_request.yml b/.github/workflows/pull_request.yml index 5fe41712136..901cb9b572d 100644 --- a/.github/workflows/pull_request.yml +++ b/.github/workflows/pull_request.yml @@ -21,10 +21,10 @@ jobs: if: ${{ contains(github.event.pull_request.labels.*.name, 'ready-for-testing') && github.event.pull_request.merged != true }} runs-on: ubuntu-20.04 steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 with: ref: ${{ github.event.pull_request.base.sha }} - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 with: clean: false - name: Check License Header @@ -40,7 +40,7 @@ jobs: run: | git diff -U0 --no-color ${{ github.event.pull_request.base.sha }} HEAD | /usr/share/clang/clang-format-10/clang-format-diff.py -p1 | tee /tmp/.clang-format-diff [ -s /tmp/.clang-format-diff ] && exit 1 || true - - uses: actions/setup-python@v4 + - uses: actions/setup-python@v5 with: python-version: 3.7 - name: Prepare Gherkin exec environ @@ -51,7 +51,7 @@ jobs: build: name: build needs: lint - runs-on: [self-hosted, nebula] + runs-on: [self-hosted, nebula, linux] strategy: fail-fast: false matrix: @@ -86,10 +86,10 @@ jobs: --health-timeout 5s --health-retries 10 steps: - - uses: webiny/action-post-run@3.0.0 + - uses: webiny/action-post-run@3.1.0 with: run: sh -c "find . -mindepth 1 -delete" - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Prepare environment id: prepare run: | @@ -231,7 +231,7 @@ jobs: run: | exit $(grep -P "SUMMARY: AddressSanitizer: \d+ byte\(s\) leaked in \d+ allocation\(s\)\." build/server_*/logs/*stderr.log | wc -l) - name: Upload logs - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 if: ${{ failure() }} with: name: ${{ matrix.os }}-${{ matrix.compiler }}-nebula-test-logs diff --git a/.github/workflows/rc.yml b/.github/workflows/rc.yml index d52963cbb21..f03194f246a 100644 --- a/.github/workflows/rc.yml +++ b/.github/workflows/rc.yml @@ -21,7 +21,7 @@ env: jobs: package: name: build package - runs-on: [self-hosted, nebula] + runs-on: [self-hosted, nebula, linux] strategy: fail-fast: false matrix: @@ -38,11 +38,11 @@ jobs: CPACK_DIR: ./pkg-build/cpack_output SYMS_DIR: ./pkg-build/symbols steps: - - uses: webiny/action-post-run@3.0.0 + - uses: webiny/action-post-run@3.1.0 with: run: sh -c "find . -mindepth 1 -delete" - - uses: actions/checkout@v3 - - uses: actions/setup-go@v4 + - uses: actions/checkout@v4 + - uses: actions/setup-go@v5 with: go-version: 'stable' cache-dependency-path: nebula-console/go.sum @@ -67,13 +67,13 @@ jobs: docker_build: needs: package name: docker-build - runs-on: [self-hosted, nebula] + runs-on: [self-hosted, nebula, linux] steps: - - uses: webiny/action-post-run@3.0.0 + - uses: webiny/action-post-run@3.1.0 with: run: sh -c "find . -mindepth 1 -delete" - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - id: tagname run: | echo tag="v${{ github.event.inputs.version }}" >> $GITHUB_OUTPUT @@ -96,15 +96,15 @@ jobs: echo "storagedTag=$storagedTag" >> $GITHUB_OUTPUT echo "metadTag=$metadTag" >> $GITHUB_OUTPUT echo "toolsTag=$toolsTag" >> $GITHUB_OUTPUT - - uses: docker/setup-qemu-action@v2 - - uses: docker/setup-buildx-action@v2 - - uses: docker/login-action@v2 + - uses: docker/setup-qemu-action@v3 + - uses: docker/setup-buildx-action@v3 + - uses: docker/login-action@v3 with: registry: ${{ secrets.HARBOR_REGISTRY }} username: ${{ secrets.HARBOR_USERNAME }} password: ${{ secrets.HARBOR_PASSWORD }} - name: docker-graph - uses: docker/build-push-action@v4 + uses: docker/build-push-action@v6 with: context: . file: ./docker/Dockerfile @@ -120,7 +120,7 @@ jobs: BRANCH=${{ steps.tagname.outputs.tag }} VERSION=${{ steps.tagname.outputs.tagnum }} - name: docker-storage - uses: docker/build-push-action@v4 + uses: docker/build-push-action@v6 with: context: . file: ./docker/Dockerfile @@ -136,7 +136,7 @@ jobs: BRANCH=${{ steps.tagname.outputs.tag }} VERSION=${{ steps.tagname.outputs.tagnum }} - name: docker-meta - uses: docker/build-push-action@v4 + uses: docker/build-push-action@v6 with: context: . file: ./docker/Dockerfile @@ -152,7 +152,7 @@ jobs: BRANCH=${{ steps.tagname.outputs.tag }} VERSION=${{ steps.tagname.outputs.tagnum }} - name: docker-tool - uses: docker/build-push-action@v4 + uses: docker/build-push-action@v6 with: context: . file: ./docker/Dockerfile @@ -173,7 +173,7 @@ jobs: test: name: test needs: package - runs-on: [self-hosted, nebula] + runs-on: [self-hosted, nebula, linux] strategy: fail-fast: false matrix: @@ -188,10 +188,10 @@ jobs: container: image: vesoft/nebula-dev:${{ matrix.os }} steps: - - uses: webiny/action-post-run@3.0.0 + - uses: webiny/action-post-run@3.1.0 with: run: sh -c "find . -mindepth 1 -delete" - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - id: tag run: echo tagnum=${{ github.event.inputs.version }} >> $GITHUB_OUTPUT @@ -252,7 +252,7 @@ jobs: working-directory: tests/ timeout-minutes: 2 - name: Upload logs - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 if: ${{ failure() }} with: name: ${{ matrix.os }}-${{ matrix.compiler }}-nebula-test-logs diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 74821b79d01..6da05c91d5e 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -16,11 +16,14 @@ defaults: jobs: package: name: package - runs-on: [self-hosted, medium] + runs-on: [self-hosted, linux] container: image: vesoft/nebula-dev:centos7 steps: - - uses: actions/checkout@v3 + - uses: webiny/action-post-run@3.1.0 + with: + run: sh -c "find . -mindepth 1 -delete" + - uses: actions/checkout@v4 - uses: ./.github/actions/tagname-action id: tag - uses: vesoft-inc/.github/actions/setup-minio@master @@ -40,7 +43,7 @@ jobs: docker_build: name: docker-build - runs-on: [self-hosted, nebula] + runs-on: [self-hosted, linux] strategy: fail-fast: false matrix: @@ -50,10 +53,10 @@ jobs: - storaged - tools steps: - - uses: webiny/action-post-run@3.0.0 + - uses: webiny/action-post-run@3.1.0 with: run: sh -c "find . -mindepth 1 -delete" - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - uses: ./.github/actions/tagname-action id: tagname - id: docker