github.com/oam-dev/kubevela@v1.9.11/.github/workflows/sync-sdk.yaml (about) 1 name: Sync SDK 2 3 on: 4 push: 5 paths: 6 - vela-templates/definitions/internal/** 7 - pkg/definition/gen_sdk/** 8 - .github/workflows/sync-sdk.yaml 9 tags: 10 - "v*" 11 branches: 12 - master 13 - release-* 14 permissions: 15 contents: read 16 17 env: 18 GO_VERSION: '1.19' 19 20 jobs: 21 sync_sdk: 22 runs-on: ubuntu-22.04 23 steps: 24 - name: Set up Go 25 uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491 26 with: 27 go-version: ${{ env.GO_VERSION }} 28 29 - name: Check out code into the Go module directory 30 uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 31 32 - name: Get the version 33 id: get_version 34 run: echo "VERSION=${GITHUB_REF#refs/tags/}" >> $GITHUB_OUTPUT 35 36 - name: Get dependencies 37 run: | 38 go get -v -t -d ./... 39 40 - name: Install Go tools 41 run: | 42 make goimports 43 44 - name: Build CLI 45 run: make vela-cli 46 47 - name: Sync SDK to kubevela/kubevela-go-sdk 48 run: bash ./hack/sdk/sync.sh 49 env: 50 SSH_DEPLOY_KEY: ${{ secrets.GO_SDK_DEPLOY_KEY }} 51 VERSION: ${{ steps.get_version.outputs.VERSION }} 52 COMMIT_ID: ${{ github.sha }}