Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 11 additions & 4 deletions .github/workflows/gen-client.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,22 @@ jobs:
timeout-minutes: 30
runs-on: ubuntu-latest
steps:
- name: Generate GitHub App token
id: app-token
uses: actions/create-github-app-token@f8d387b68d61c58ab83c6c016672934102569859 # v3
with:
app-id: ${{ secrets.CQ_APP_ID }}
private-key: ${{ secrets.CQ_APP_PRIVATE_KEY }}
permission-contents: write
permission-pull-requests: write
- name: Checkout
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
with:
token: ${{ secrets.GH_CQ_BOT }}
token: ${{ steps.app-token.outputs.token }}

- name: Get Specs File
run: |
curl -H "Authorization: token ${{ secrets.GH_CQ_BOT }}" https://raw.githubusercontent.com/cloudquery/cloud/main/platform/internal/servergen/spec.json -o spec.json
curl -H "Authorization: token ${{ steps.app-token.outputs.token }}" https://raw.githubusercontent.com/cloudquery/cloud/main/platform/internal/servergen/spec.json -o spec.json
- name: Set up Go 1.x
uses: actions/setup-go@4b73464bb391d4059bd26b0524d20df3927bd417 # v6
Expand All @@ -29,11 +37,10 @@ jobs:
uses: peter-evans/create-pull-request@c0f553fe549906ede9cf27b5156039d195d2ece0 # v8
with:
# required so the PR triggers workflow runs
token: ${{ secrets.GH_CQ_BOT }}
token: ${{ steps.app-token.outputs.token }}
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
12 changes: 10 additions & 2 deletions .github/workflows/release-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,18 @@ jobs:
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- name: Generate GitHub App token
id: app-token
uses: actions/create-github-app-token@f8d387b68d61c58ab83c6c016672934102569859 # v3
with:
app-id: ${{ secrets.CQ_APP_ID }}
private-key: ${{ secrets.CQ_APP_PRIVATE_KEY }}
permission-contents: write
permission-pull-requests: write
- uses: googleapis/release-please-action@16a9c90856f42705d54a6fda1823352bdc62cf38 # v4
id: release
with:
token: ${{ secrets.GH_CQ_BOT }}
token: ${{ steps.app-token.outputs.token }}
- name: Parse semver string
if: steps.release.outputs.release_created
id: semver_parser
Expand All @@ -32,7 +40,7 @@ jobs:
uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8
if: steps.release.outputs.release_created && steps.semver_parser.outputs.prerelease == ''
with:
github-token: ${{ secrets.GH_CQ_BOT }}
github-token: ${{ steps.app-token.outputs.token }}
script: |
github.rest.actions.createWorkflowDispatch({
owner: 'cloudquery',
Expand Down