chore(automation): test attempt to pass new API endpoints to generate… #572
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: 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 |