From 2af2050336a97adca300d6b22660dfba999b0db3 Mon Sep 17 00:00:00 2001 From: Deshi Xiao Date: Sun, 7 Feb 2021 18:55:06 +0800 Subject: [PATCH] feat: Add qiniu oss artifactory repo 1. use action to upload k8s binary to qiniu repo Signed-off-by: Deshi Xiao --- .github/workflows/build.yml | 30 ++++++++++++++++++++++++++++++ .github/workflows/go.yml | 25 ++++++++++++++++++------- 2 files changed, 48 insertions(+), 7 deletions(-) create mode 100644 .github/workflows/build.yml diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 000000000..6c8359ed8 --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,30 @@ +name: Build for k8e + +on: + push: + branches: + - dev + +jobs: + + build: + name: Build + runs-on: ubuntu-latest + steps: + + - name: Set up Go 1.x + uses: actions/setup-go@v2 + with: + go-version: ^1.15 + + - name: Check out code into the Go module directory + uses: actions/checkout@v2 + + - name: check depends + run: sudo apt-get install -y libseccomp-dev + + - name: generate resources + run: make generate + + - name: Test + run: go test -v . \ No newline at end of file diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml index cfb18d22b..b907f5f6f 100644 --- a/.github/workflows/go.yml +++ b/.github/workflows/go.yml @@ -1,10 +1,8 @@ -name: Go +name: Go for k8e on: - push: - branches: [ dev ] pull_request: - branches: [ dev ] + branches: [ master ] jobs: @@ -27,8 +25,21 @@ jobs: - name: generate resources run: make generate + - name: Test + run: go test -v . + - name: package bin run: SKIP_VALIDATE=true make - - - name: Test - run: go test -v . \ No newline at end of file + + - name: Deploy to qiniu + uses: saltbo/uptoc@v1.4.3 + with: + driver: qiniu + region: cn-south-1 + bucket: k8e + exclude: .cache,test + dist: dist/artifacts + env: + UPTOC_UPLOADER_AK: ${{ secrets.UPTOC_UPLOADER_KEYID }} + UPTOC_UPLOADER_SK: ${{ secrets.UPTOC_UPLOADER_KEYSECRET }} + \ No newline at end of file