-
Notifications
You must be signed in to change notification settings - Fork 94
72 lines (63 loc) · 2 KB
/
generate.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
name: Tutone Generate
on:
push:
branches:
- 'feat/automated-codegen'
workflow_dispatch:
inputs:
apiEndpoints:
required: true
type: string
description: 'The API endpoints for which to generate code'
workflow_call:
inputs:
apiEndpoints:
required: true
type: string
description: 'The API endpoints for which to generate code'
jobs:
generate:
runs-on: ubuntu-latest
steps:
- name: Write temporary Tutone config file
uses: DamianReeves/write-file-action@master
with:
path: .tutone.yml
contents: |
${{ inputs.apiEndpoints }}
write-mode: overwrite
- name: Check config file contents
run: cat .tutone.yml
shell: bash
# - name: Install Go
# uses: actions/setup-go@v5
# with:
# go-version: 1.21.x
# - name: Add GOBIN to PATH
# run: echo "$(go env GOPATH)/bin" >> $GITHUB_PATH
# shell: bash
# - name: Checkout code
# uses: actions/checkout@v4
# - name: Set up git user
# run: |
# git config --global user.name nr-developer-toolkit
# git config --global user.email [email protected]
# - name: Install Tutone
# run: go install github.com/newrelic/tutone/cmd/tutone@latest
# - name: Generate new code
# run: tutone generate
# env:
# NEW_RELIC_API_KEY: ${{ secrets.NEW_RELIC_API_KEY }}
# - name: Create Pull Request
# uses: peter-evans/create-pull-request@v3
# with:
# token: ${{ secrets.DEV_TOOLKIT_TOKEN }}
# commit-message: 'chore(tutone): update generated code'
# signoff: false
# branch: feat/generated-code
# title: 'feat(codegen): generate code based on latest API changes'
# body: |
# Update generated code using Tutone
# labels: |
# enhancement
# draft: true