fix(deps): Update module github.com/cloudquery/cloudquery-api-go to v1.11.1 #2897
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Auto trigger gen code | |
on: | |
pull_request: | |
types: [opened, reopened] | |
paths: | |
- '**.mod' | |
jobs: | |
gen-code-deps: | |
timeout-minutes: 5 | |
runs-on: ubuntu-latest | |
# We auto gen code for service SDK updates (e.g. AWS SDK), but not for our own SDK, as those changes should be handled manually | |
if: github.event.pull_request.user.login == 'cq-bot' && startsWith(github.event.pull_request.title, 'fix(deps)') && startsWith(github.head_ref, 'renovate/') && !contains(github.head_ref, 'cloudquery-plugin-sdk') | |
steps: | |
- name: Get changed files | |
id: changed-files | |
uses: Ana06/get-changed-files@v2.3.0 | |
with: | |
filter: 'go.mod' | |
- uses: actions/github-script@v7 | |
if: startsWith(steps.changed-files.outputs.all, 'plugins/source') || startsWith(steps.changed-files.outputs.all, 'plugins/destination') || startsWith(steps.changed-files.outputs.all, 'cli') | |
env: | |
SHA: ${{ github.event.pull_request.head.sha }} | |
GO_MOD_FILE: ${{ steps.changed-files.outputs.all }} | |
with: | |
github-token: ${{ secrets.GH_CQ_BOT }} | |
script: | | |
const path = require('path'); | |
const { issue: { number: issue_number }, repo: { owner, repo } } = context; | |
const { SHA: sha, GO_MOD_FILE: goModFile } = process.env; | |
// e.g. plugins/source/aws/go.mod | |
const dir = path.dirname(goModFile); | |
console.log({ issue_number, owner, repo, sha, dir }); | |
await github.rest.issues.createComment({ | |
issue_number, | |
owner, | |
repo, | |
body: `/gen sha=${sha} dir=${dir}` | |
}) |