From 9b84844ec1657e9f4071679e42eb309df6d5b3f4 Mon Sep 17 00:00:00 2001 From: George Date: Wed, 22 Mar 2023 11:14:24 +0800 Subject: [PATCH 1/2] Update the referenced workflow and remove the deprecated version --- .github/workflows/nightly.yml | 52 +++++++++++++-------------- .github/workflows/pull_request.yml | 14 ++++---- .github/workflows/rc.yml | 58 +++++++++++++++--------------- .github/workflows/release.yml | 8 ++--- 4 files changed, 66 insertions(+), 66 deletions(-) diff --git a/.github/workflows/nightly.yml b/.github/workflows/nightly.yml index 3fa9b884fa0..d0cb46d65e7 100644 --- a/.github/workflows/nightly.yml +++ b/.github/workflows/nightly.yml @@ -29,11 +29,11 @@ jobs: container: image: vesoft/nebula-dev:${{ matrix.os }} steps: - - uses: webiny/action-post-run@2.0.1 + - uses: webiny/action-post-run@3.0.0 with: run: sh -c "find . -mindepth 1 -delete" - - uses: actions/checkout@v2 - - uses: actions/setup-go@v2 + - uses: actions/checkout@v3 + - uses: actions/setup-go@v4 with: go-version: "^1.16.7" - name: package @@ -45,7 +45,7 @@ jobs: run: | 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 "::set-output name=subdir::$subdir" + echo "subdir=$subdir" >> $GITHUB_OUTPUT # - uses: actions/upload-artifact@v1 # with: # name: ${{ matrix.os }}-nightly @@ -64,17 +64,17 @@ jobs: needs: package runs-on: [self-hosted, nebula] steps: - - uses: webiny/action-post-run@2.0.1 + - uses: webiny/action-post-run@3.0.0 with: run: sh -c "find . -mindepth 1 -delete" - - uses: actions/checkout@v2 - - uses: docker/login-action@v1 + - uses: actions/checkout@v3 + - uses: docker/login-action@v2 with: username: ${{ secrets.DOCKER_USERNAME }} password: ${{ secrets.DOCKER_PASSWORD }} - - uses: docker/setup-qemu-action@v1 - - uses: docker/setup-buildx-action@v1 - - uses: docker/build-push-action@v2 + - uses: docker/setup-qemu-action@v2 + - uses: docker/setup-buildx-action@v2 + - uses: docker/build-push-action@v4 with: context: . file: ./docker/Dockerfile @@ -84,7 +84,7 @@ jobs: target: graphd cache-to: type=local,dest=/tmp/buildx-cache,mode=max push: true - - uses: docker/build-push-action@v2 + - uses: docker/build-push-action@v4 with: context: . file: ./docker/Dockerfile @@ -94,7 +94,7 @@ jobs: target: storaged cache-from: type=local,src=/tmp/buildx-cache push: true - - uses: docker/build-push-action@v2 + - uses: docker/build-push-action@v4 with: context: . file: ./docker/Dockerfile @@ -104,7 +104,7 @@ jobs: target: metad cache-from: type=local,src=/tmp/buildx-cache push: true - - uses: docker/build-push-action@v2 + - uses: docker/build-push-action@v4 with: context: . file: ./docker/Dockerfile @@ -137,10 +137,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@2.0.1 + - uses: webiny/action-post-run@3.0.0 with: run: sh -c "find . -mindepth 1 -delete" - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - name: Prepare environment run: | [ -d build/ ] && rm -rf build/* || mkdir -p build @@ -190,12 +190,12 @@ jobs: - name: coverage run: | ~/.local/bin/fastcov -d build -l -o fastcov.info -p --exclude /usr/include /usr/lib /opt/vesoft build/ tests/ /test /mock .lex .yy - - uses: codecov/codecov-action@v2 + - uses: codecov/codecov-action@v3 with: files: fastcov.info fail_ci_if_error: false - name: Upload logs - uses: actions/upload-artifact@v2 + uses: actions/upload-artifact@v3 if: ${{ failure() }} with: name: ${{ matrix.os }}-${{ matrix.compiler }}-nebula-test-logs @@ -234,32 +234,32 @@ jobs: --health-timeout 5s --health-retries 10 steps: - - uses: webiny/action-post-run@2.0.1 + - uses: webiny/action-post-run@3.0.0 with: run: sh -c "find . -mindepth 1 -delete" - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - name: output some vars id: vars env: SHA_EXT: sha256sum.txt run: | subdir=$(date -u +%Y.%m.%d) - echo "::set-output name=subdir::$subdir" + echo "subdir=$subdir" >> $GITHUB_OUTPUT - id: oss_package run: | case ${{ matrix.os }} in ubuntu1804) - echo "::set-output name=p::nebula-graph-${{ steps.vars.outputs.subdir }}-nightly.ubuntu1804.amd64.tar.gz" + echo "p=nebula-graph-${{ steps.vars.outputs.subdir }}-nightly.ubuntu1804.amd64.tar.gz" >> $GITHUB_OUTPUT ;; ubuntu2004) - echo "::set-output name=p::nebula-graph-${{ steps.vars.outputs.subdir }}-nightly.ubuntu2004.amd64.tar.gz" + echo "p=nebula-graph-${{ steps.vars.outputs.subdir }}-nightly.ubuntu2004.amd64.tar.gz" >> $GITHUB_OUTPUT ;; centos7) - echo "::set-output name=p::nebula-graph-${{ steps.vars.outputs.subdir }}-nightly.el7.x86_64.tar.gz" + echo "p=nebula-graph-${{ steps.vars.outputs.subdir }}-nightly.el7.x86_64.tar.gz" >> $GITHUB_OUTPUT ;; centos8) - echo "::set-output name=p::nebula-graph-${{ steps.vars.outputs.subdir }}-nightly.el8.x86_64.tar.gz" + echo "p=nebula-graph-${{ steps.vars.outputs.subdir }}-nightly.el8.x86_64.tar.gz" >> $GITHUB_OUTPUT ;; esac - name: Prepare environment @@ -270,7 +270,7 @@ jobs: - name: CMake id: cmake run: | - echo "::set-output name=j::8" + echo "j=8" >> $GITHUB_OUTPUT - name: download from oss run: | ossutil64 -e ${{ secrets.OSS_ENDPOINT }} \ @@ -303,7 +303,7 @@ jobs: working-directory: tests/ timeout-minutes: 2 - name: Upload logs - uses: actions/upload-artifact@v2 + uses: actions/upload-artifact@v3 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 d7ee4dc886b..5fe41712136 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@v2 + - uses: actions/checkout@v3 with: ref: ${{ github.event.pull_request.base.sha }} - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 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@v2 + - uses: actions/setup-python@v4 with: python-version: 3.7 - name: Prepare Gherkin exec environ @@ -86,10 +86,10 @@ jobs: --health-timeout 5s --health-retries 10 steps: - - uses: webiny/action-post-run@2.0.1 + - uses: webiny/action-post-run@3.0.0 with: run: sh -c "find . -mindepth 1 -delete" - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - name: Prepare environment id: prepare run: | @@ -221,7 +221,7 @@ jobs: if: ${{ matrix.compiler == 'gcc-9.3' && matrix.os == 'ubuntu2004' }} run: | ~/.local/bin/fastcov -d build -l -o fastcov.info -p --exclude /usr/include /usr/lib /opt/vesoft build/ tests/ /test /mock .lex .yy - - uses: codecov/codecov-action@v2 + - uses: codecov/codecov-action@v3 if: ${{ matrix.compiler == 'gcc-9.3' && matrix.os == 'ubuntu2004' }} with: files: fastcov.info @@ -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@v2 + uses: actions/upload-artifact@v3 if: ${{ failure() }} with: name: ${{ matrix.os }}-${{ matrix.compiler }}-nebula-test-logs diff --git a/.github/workflows/rc.yml b/.github/workflows/rc.yml index d76a5971e79..24ea0ebf36e 100644 --- a/.github/workflows/rc.yml +++ b/.github/workflows/rc.yml @@ -35,15 +35,15 @@ jobs: CPACK_DIR: ./pkg-build/cpack_output SYMS_DIR: ./pkg-build/symbols steps: - - uses: webiny/action-post-run@2.0.1 + - uses: webiny/action-post-run@3.0.0 with: run: sh -c "find . -mindepth 1 -delete" - - uses: actions/checkout@v2 - - uses: actions/setup-go@v2 + - uses: actions/checkout@v3 + - uses: actions/setup-go@v4 with: go-version: '^1.16.7' - id: tag - run: echo ::set-output name=tagnum::${{ github.event.inputs.version }} + run: echo tagnum=${{ github.event.inputs.version }} - name: package run: ./package/package.sh -v ${{ steps.tag.outputs.tagnum }} - name: output some vars @@ -73,15 +73,15 @@ jobs: runs-on: [self-hosted, nebula] steps: - - uses: webiny/action-post-run@2.0.1 + - uses: webiny/action-post-run@3.0.0 with: run: sh -c "find . -mindepth 1 -delete" - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - id: tagname run: | - echo ::set-output name=tag::"v${{ github.event.inputs.version }}" - echo ::set-output name=tagnum::"${{ github.event.inputs.version }}" - echo ::set-output name=majorver::"v$(echo ${{ github.event.inputs.version }} | cut -f1 -d'.')" + echo tag="v${{ github.event.inputs.version }}" >> $GITHUB_OUTPUT + echo tagnum="${{ github.event.inputs.version }}" >> $GITHUB_OUTPUT + echo majorver="v$(echo ${{ github.event.inputs.version }} | cut -f1 -d'.')" >> $GITHUB_OUTPUT - id: docker run: | graphdTag="" @@ -95,19 +95,19 @@ jobs: metadTag="${{ secrets.HARBOR_REGISTRY }}/vesoft/nebula-metad:latest" toolsTag="${{ secrets.HARBOR_REGISTRY }}/vesoft/nebula-tools:latest" fi - echo "::set-output name=graphdTag::$graphdTag" - echo "::set-output name=storagedTag::$storagedTag" - echo "::set-output name=metadTag::$metadTag" - echo "::set-output name=toolsTag::$toolsTag" - - uses: docker/setup-qemu-action@v1 - - uses: docker/setup-buildx-action@v1 - - uses: docker/login-action@v1 + echo "graphdTag=$graphdTag" >> $GITHUB_OUTPUT + 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 with: registry: ${{ secrets.HARBOR_REGISTRY }} username: ${{ secrets.HARBOR_USERNAME }} password: ${{ secrets.HARBOR_PASSWORD }} - name: docker-graph - uses: docker/build-push-action@v2 + uses: docker/build-push-action@v4 with: context: . file: ./docker/Dockerfile @@ -123,7 +123,7 @@ jobs: BRANCH=${{ steps.tagname.outputs.tag }} VERSION=${{ steps.tagname.outputs.tagnum }} - name: docker-storage - uses: docker/build-push-action@v2 + uses: docker/build-push-action@v4 with: context: . file: ./docker/Dockerfile @@ -139,7 +139,7 @@ jobs: BRANCH=${{ steps.tagname.outputs.tag }} VERSION=${{ steps.tagname.outputs.tagnum }} - name: docker-meta - uses: docker/build-push-action@v2 + uses: docker/build-push-action@v4 with: context: . file: ./docker/Dockerfile @@ -155,7 +155,7 @@ jobs: BRANCH=${{ steps.tagname.outputs.tag }} VERSION=${{ steps.tagname.outputs.tagnum }} - name: docker-tool - uses: docker/build-push-action@v2 + uses: docker/build-push-action@v4 with: context: . file: ./docker/Dockerfile @@ -193,27 +193,27 @@ jobs: container: image: vesoft/nebula-dev:${{ matrix.os }} steps: - - uses: webiny/action-post-run@2.0.1 + - uses: webiny/action-post-run@3.0.0 with: run: sh -c "find . -mindepth 1 -delete" - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - id: tag - run: echo ::set-output name=tagnum::${{ github.event.inputs.version }} + run: echo tagnum=${{ github.event.inputs.version }} - id: oss_package run: | case ${{ matrix.os }} in ubuntu1804) - echo "::set-output name=p::nebula-graph-${{ steps.tag.outputs.tagnum }}.ubuntu1804.amd64.tar.gz" + echo "p=nebula-graph-${{ steps.tag.outputs.tagnum }}.ubuntu1804.amd64.tar.gz" >> $GITHUB_OUTPUT ;; ubuntu2004) - echo "::set-output name=p::nebula-graph-${{ steps.tag.outputs.tagnum }}.ubuntu2004.amd64.tar.gz" + echo "p=nebula-graph-${{ steps.tag.outputs.tagnum }}.ubuntu2004.amd64.tar.gz" >> $GITHUB_OUTPUT ;; centos7) - echo "::set-output name=p::nebula-graph-${{ steps.tag.outputs.tagnum }}.el7.x86_64.tar.gz" + echo "p=nebula-graph-${{ steps.tag.outputs.tagnum }}.el7.x86_64.tar.gz" >> $GITHUB_OUTPUT ;; centos8) - echo "::set-output name=p::nebula-graph-${{ steps.tag.outputs.tagnum }}.el8.x86_64.tar.gz" + echo "p=nebula-graph-${{ steps.tag.outputs.tagnum }}.el8.x86_64.tar.gz" >> $GITHUB_OUTPUT ;; esac - name: Prepare environment @@ -224,7 +224,7 @@ jobs: - name: CMake id: cmake run: | - echo "::set-output name=j::8" + echo "j=8" >> $GITHUB_OUTPUT - name: download from oss run: | ossutil64 -e ${{ secrets.OSS_ENDPOINT }} \ @@ -257,7 +257,7 @@ jobs: working-directory: tests/ timeout-minutes: 2 - name: Upload logs - uses: actions/upload-artifact@v2 + uses: actions/upload-artifact@v3 if: ${{ failure() }} with: name: ${{ matrix.os }}-${{ matrix.compiler }}-nebula-test-logs diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 27952b7b58e..3e1c73398ca 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -20,7 +20,7 @@ jobs: container: image: vesoft/nebula-dev:centos7 steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - uses: ./.github/actions/tagname-action id: tag - run: | @@ -43,10 +43,10 @@ jobs: - storaged - tools steps: - - uses: webiny/action-post-run@2.0.1 + - uses: webiny/action-post-run@3.0.0 with: run: sh -c "find . -mindepth 1 -delete" - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - uses: ./.github/actions/tagname-action id: tagname - id: docker @@ -56,7 +56,7 @@ jobs: if [[ $majorver == ${{ steps.tagname.outputs.majorver }} ]]; then tag="latest" fi - echo "::set-output name=tag::$tag" + echo "tag=$tag" >> $GITHUB_OUTPUT - name: Sync docker images env: FROM_IMAGE: docker://${{ secrets.HARBOR_REGISTRY }}/vesoft/nebula-${{ matrix.service }} From 24e88e65225df03afba6ad2717695ef7b99f5e1a Mon Sep 17 00:00:00 2001 From: George Date: Wed, 22 Mar 2023 11:32:05 +0800 Subject: [PATCH 2/2] update release workflow --- .github/workflows/rc.yml | 24 ++++++++++++------------ .github/workflows/release.yml | 4 ++-- 2 files changed, 14 insertions(+), 14 deletions(-) diff --git a/.github/workflows/rc.yml b/.github/workflows/rc.yml index 24ea0ebf36e..e5fc54269f9 100644 --- a/.github/workflows/rc.yml +++ b/.github/workflows/rc.yml @@ -90,10 +90,10 @@ jobs: toolsTag="" majorver=$(git tag -l --sort=v:refname | tail -n1 | cut -f1 -d".") if [[ $majorver == ${{ steps.tagname.outputs.majorver }} ]]; then - graphdTag="${{ secrets.HARBOR_REGISTRY }}/vesoft/nebula-graphd:latest" - storagedTag="${{ secrets.HARBOR_REGISTRY }}/vesoft/nebula-storaged:latest" - metadTag="${{ secrets.HARBOR_REGISTRY }}/vesoft/nebula-metad:latest" - toolsTag="${{ secrets.HARBOR_REGISTRY }}/vesoft/nebula-tools:latest" + graphdTag="${{ secrets.HARBOR_REGISTRY }}/rc/nebula-graphd:latest" + storagedTag="${{ secrets.HARBOR_REGISTRY }}/rc/nebula-storaged:latest" + metadTag="${{ secrets.HARBOR_REGISTRY }}/rc/nebula-metad:latest" + toolsTag="${{ secrets.HARBOR_REGISTRY }}/rc/nebula-tools:latest" fi echo "graphdTag=$graphdTag" >> $GITHUB_OUTPUT echo "storagedTag=$storagedTag" >> $GITHUB_OUTPUT @@ -113,8 +113,8 @@ jobs: file: ./docker/Dockerfile platforms: linux/amd64,linux/arm64 tags: | - ${{ secrets.HARBOR_REGISTRY }}/vesoft/nebula-graphd:${{ steps.tagname.outputs.tag }} - ${{ secrets.HARBOR_REGISTRY }}/vesoft/nebula-graphd:${{ steps.tagname.outputs.majorver }} + ${{ secrets.HARBOR_REGISTRY }}/rc/nebula-graphd:${{ steps.tagname.outputs.tag }} + ${{ secrets.HARBOR_REGISTRY }}/rc/nebula-graphd:${{ steps.tagname.outputs.majorver }} ${{ steps.docker.outputs.graphdTag }} target: graphd cache-to: type=local,dest=/tmp/buildx-cache,mode=max @@ -129,8 +129,8 @@ jobs: file: ./docker/Dockerfile platforms: linux/amd64,linux/arm64 tags: | - ${{ secrets.HARBOR_REGISTRY }}/vesoft/nebula-storaged:${{ steps.tagname.outputs.tag }} - ${{ secrets.HARBOR_REGISTRY }}/vesoft/nebula-storaged:${{ steps.tagname.outputs.majorver }} + ${{ secrets.HARBOR_REGISTRY }}/rc/nebula-storaged:${{ steps.tagname.outputs.tag }} + ${{ secrets.HARBOR_REGISTRY }}/rc/nebula-storaged:${{ steps.tagname.outputs.majorver }} ${{ steps.docker.outputs.storagedTag }} target: storaged push: true @@ -145,8 +145,8 @@ jobs: file: ./docker/Dockerfile platforms: linux/amd64,linux/arm64 tags: | - ${{ secrets.HARBOR_REGISTRY }}/vesoft/nebula-metad:${{ steps.tagname.outputs.tag }} - ${{ secrets.HARBOR_REGISTRY }}/vesoft/nebula-metad:${{ steps.tagname.outputs.majorver }} + ${{ secrets.HARBOR_REGISTRY }}/rc/nebula-metad:${{ steps.tagname.outputs.tag }} + ${{ secrets.HARBOR_REGISTRY }}/rc/nebula-metad:${{ steps.tagname.outputs.majorver }} ${{ steps.docker.outputs.metadTag }} target: metad push: true @@ -161,8 +161,8 @@ jobs: file: ./docker/Dockerfile platforms: linux/amd64,linux/arm64 tags: | - ${{ secrets.HARBOR_REGISTRY }}/vesoft/nebula-tools:${{ steps.tagname.outputs.tag }} - ${{ secrets.HARBOR_REGISTRY }}/vesoft/nebula-tools:${{ steps.tagname.outputs.majorver }} + ${{ secrets.HARBOR_REGISTRY }}/rc/nebula-tools:${{ steps.tagname.outputs.tag }} + ${{ secrets.HARBOR_REGISTRY }}/rc/nebula-tools:${{ steps.tagname.outputs.majorver }} ${{ steps.docker.outputs.toolsTag }} target: tools push: true diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 3e1c73398ca..cdca433abc2 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -59,9 +59,9 @@ jobs: echo "tag=$tag" >> $GITHUB_OUTPUT - name: Sync docker images env: - FROM_IMAGE: docker://${{ secrets.HARBOR_REGISTRY }}/vesoft/nebula-${{ matrix.service }} + FROM_IMAGE: docker://${{ secrets.HARBOR_REGISTRY }}/rc/nebula-${{ matrix.service }} TO_IMAGE: docker://docker.io/vesoft/nebula-${{ matrix.service }} - CMD: docker run --rm -i quay.io/containers/skopeo:v1.4.1 copy -a --src-creds ${{ secrets.HARBOR_USERNAME }}:${{ secrets.HARBOR_PASSWORD }} --dest-creds ${{ secrets.DOCKER_USERNAME }}:${{ secrets.DOCKER_PASSWORD }} + CMD: docker run --rm -i quay.io/containers/skopeo:latest copy -a --src-creds ${{ secrets.HARBOR_USERNAME }}:${{ secrets.HARBOR_PASSWORD }} --dest-creds ${{ secrets.DOCKER_USERNAME }}:${{ secrets.DOCKER_PASSWORD }} run: | ${{ env.CMD }} ${{ env.FROM_IMAGE }}:${{ steps.tagname.outputs.tag }} ${{ env.TO_IMAGE }}:${{ steps.tagname.outputs.tag }} ${{ env.CMD }} ${{ env.FROM_IMAGE }}:${{ steps.tagname.outputs.tag }} ${{ env.TO_IMAGE }}:${{ steps.tagname.outputs.majorver }}