github.com/oam-dev/kubevela@v1.9.11/.github/workflows/sync-api.yml (about)

     1  name: sync-api
     2  on:
     3    push:
     4      paths:
     5        - 'apis/**'
     6        - 'pkg/oam/**'
     7      tags:
     8        - "v*"
     9  
    10  permissions:
    11    contents: read
    12  
    13  env:
    14    GO_VERSION: '1.19'
    15  
    16  jobs:
    17    sync-core-api:
    18      runs-on: ubuntu-22.04
    19      steps:
    20        - name: Set up Go
    21          uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491
    22          with:
    23            go-version: ${{ env.GO_VERSION }}
    24  
    25        - name: Check out code into the Go module directory
    26          uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608
    27  
    28        - name: Get the version
    29          id: get_version
    30          run: echo "VERSION=${GITHUB_REF#refs/tags/}" >> $GITHUB_OUTPUT
    31  
    32        - name: Sync to kubevela-core-api Repo
    33          env:
    34            SSH_DEPLOY_KEY: ${{ secrets.VELA_API_DEPLOY }}
    35            VERSION: ${{ steps.get_version.outputs.VERSION }}
    36            COMMIT_ID: ${{ github.sha }}
    37          run: |
    38            bash ./hack/apis/clientgen.sh
    39            bash ./hack/apis/sync.sh sync