From 29d6d13ebf6729f0952851bf7601e576cea747c0 Mon Sep 17 00:00:00 2001 From: Nut He <18328704+hetao92@users.noreply.github.com> Date: Sun, 22 Aug 2021 18:36:33 +0800 Subject: [PATCH 1/2] feat: update oss path --- .github/workflows/studio-rpm-package.yml | 2 +- .github/workflows/studio-tar-package.yml | 6 +++--- scripts/rpm-upload.sh | 8 ++++++++ scripts/tar-upload.sh | 8 ++++++++ 4 files changed, 20 insertions(+), 4 deletions(-) create mode 100644 scripts/rpm-upload.sh create mode 100644 scripts/tar-upload.sh diff --git a/.github/workflows/studio-rpm-package.yml b/.github/workflows/studio-rpm-package.yml index cd346438..e010a3c0 100644 --- a/.github/workflows/studio-rpm-package.yml +++ b/.github/workflows/studio-rpm-package.yml @@ -35,6 +35,6 @@ jobs: - name: Package run: bash ./source/nebula-graph-studio/scripts/rpm-package.sh ${{ secrets.GA_ID }} - name: Upload oss - run: cd ./source/nebula-graph-studio/tmp/ && ossutil64 -e ${{ secrets.OSS_ENDPOINT }} -i ${{ secrets.OSS_ID }} -k ${{ secrets.OSS_SECRET }} -f cp ./ ${{ secrets.OSS_URL }} --include "nebula-graph-studio-*.rpm*" --only-current-dir -r + run: bash ./source/nebula-graph-studio/scripts/rpm-upload.sh ${{ secrets.OSS_ENDPOINT }} ${{ secrets.OSS_ID }} ${{ secrets.OSS_SECRET }} ${{ secrets.OSS_URL }} diff --git a/.github/workflows/studio-tar-package.yml b/.github/workflows/studio-tar-package.yml index 0c6acb1e..1a7a0836 100644 --- a/.github/workflows/studio-tar-package.yml +++ b/.github/workflows/studio-tar-package.yml @@ -2,7 +2,7 @@ name: Studio Tar Package on: push: branches: - - master + - hetao-test jobs: package: name: build package @@ -16,7 +16,7 @@ jobs: steps: - uses: actions/checkout@v2 with: - ref: 'master' + ref: 'hetao-test' path: source/nebula-graph-studio - uses: actions/checkout@v2 with: @@ -37,6 +37,6 @@ jobs: - name: Package run: bash ./source/nebula-graph-studio/scripts/tar-package.sh ${{ secrets.GA_ID }} - name: Upload to OSS - run: ls -a & ossutil64 -e ${{ secrets.OSS_ENDPOINT }} -i ${{ secrets.OSS_ID }} -k ${{ secrets.OSS_SECRET }} -f cp ./ ${{ secrets.OSS_URL }} --include "nebula-graph-studio-*.tar.gz" --only-current-dir -r + run: bash ./source/nebula-graph-studio/scripts/tar-upload.sh ${{ secrets.OSS_ENDPOINT }} ${{ secrets.OSS_ID }} ${{ secrets.OSS_SECRET }} ${{ secrets.OSS_URL }} diff --git a/scripts/rpm-upload.sh b/scripts/rpm-upload.sh new file mode 100644 index 00000000..28cd112c --- /dev/null +++ b/scripts/rpm-upload.sh @@ -0,0 +1,8 @@ +set -ex + +DIR=`pwd` +STUDIO=$DIR/source/nebula-graph-studio +cd $STUDIO +VERSION=`cat package.json | grep '"version":' | awk 'NR==1{print $2}' | awk -F'"' '{print $2}'` +cd $STUDIO/tmp/ +ossutil64 -e $1 -i $2 -k $3 -f cp ./ $4${VERSION} --include "nebula-graph-studio-*.rpm*" --only-current-dir -r \ No newline at end of file diff --git a/scripts/tar-upload.sh b/scripts/tar-upload.sh new file mode 100644 index 00000000..21eb4267 --- /dev/null +++ b/scripts/tar-upload.sh @@ -0,0 +1,8 @@ +set -ex + +DIR=`pwd` +STUDIO=$DIR/source/nebula-graph-studio +cd $STUDIO +VERSION=`cat package.json | grep '"version":' | awk 'NR==1{print $2}' | awk -F'"' '{print $2}'` +cd $DIR +ossutil64 -e $1 -i $2 -k $3 -f cp ./ $4${VERSION} --include "nebula-graph-studio-*.tar.gz" --only-current-dir -r \ No newline at end of file From dd59f4791503951179ea444d529be9abd4fd7e99 Mon Sep 17 00:00:00 2001 From: Nut He <18328704+hetao92@users.noreply.github.com> Date: Mon, 23 Aug 2021 09:29:12 +0800 Subject: [PATCH 2/2] mod: fix branch --- .github/workflows/studio-tar-package.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/studio-tar-package.yml b/.github/workflows/studio-tar-package.yml index 1a7a0836..e526eed3 100644 --- a/.github/workflows/studio-tar-package.yml +++ b/.github/workflows/studio-tar-package.yml @@ -2,7 +2,7 @@ name: Studio Tar Package on: push: branches: - - hetao-test + - master jobs: package: name: build package @@ -16,7 +16,7 @@ jobs: steps: - uses: actions/checkout@v2 with: - ref: 'hetao-test' + ref: 'master' path: source/nebula-graph-studio - uses: actions/checkout@v2 with: