Skip to content

Generate API Client #48

Generate API Client

Generate API Client #48

Workflow file for this run

name: Generate API Client
on:
schedule:
- cron: '0 8 * * *'
workflow_dispatch:
jobs:
gen-api:
timeout-minutes: 30
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
token: ${{ secrets.GH_CQ_BOT }}
- name: Get Specs File
run: |
curl -H "Authorization: token ${{ secrets.GH_CQ_BOT }}" https://github.com/raw/cloudquery/cloud/main/internal/servergen/spec.json -o spec.json
- name: Set up Go 1.x
uses: actions/setup-go@v3
with:
go-version-file: go.mod
- name: Regenerate client
run: |
go generate ./...
- name: Create Pull Request
uses: peter-evans/create-pull-request@v5
with:
# required so the PR triggers workflow runs
token: ${{ secrets.GH_CQ_BOT }}
branch: fix/gen-cloudquery-api
base: main
title: 'fix: Generate CloudQuery Go API Client from `spec.json`'
commit-message: 'fix: Generate CloudQuery Go API Client from `spec.json`'
body: This PR was created by a scheduled workflow to generate the CloudQuery Go API Client from `spec.json`
author: cq-bot <cq-bot@users.noreply.github.com>
labels: automerge