From 450ffd2fc8f01c99af79f75379ee8d2e8a433fe8 Mon Sep 17 00:00:00 2001 From: xuwu Date: Thu, 28 Jul 2022 13:44:56 +0800 Subject: [PATCH] ci: add update fig spec workflow Signed-off-by: xuwu --- .github/workflows/update-fig-spec.yml | 29 +++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 .github/workflows/update-fig-spec.yml diff --git a/.github/workflows/update-fig-spec.yml b/.github/workflows/update-fig-spec.yml new file mode 100644 index 000000000..69e905609 --- /dev/null +++ b/.github/workflows/update-fig-spec.yml @@ -0,0 +1,29 @@ +name: Update Fig Spec +on: + push: + tags: + - "v*" + +env: + go-version: 1.18.x +jobs: + update-fig-spec: + name: Update Fig Spec + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - name: Install Go ${{ env.go-version }} + uses: actions/setup-go@v3 + with: + go-version: ${{ env.go-version }} + - name: Generate the spec + run: | + make build-core + ./dtm completion fig > dtm.ts + - name: Create Autocomplete PR + uses: withfig/push-to-fig-autocomplete-action@v1 + with: + token: ${{ secrets.FIG_TOKEN }} + autocomplete-spec-name: dtm + spec-path: dtm.ts + integration: cobra