Data API V2: extending NewServicesRepository
to build a complete li…
#7
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: Regenerate the Go SDK | |
on: | |
push: | |
branches: | |
- main | |
paths: | |
- 'api-definitions/**' | |
- 'data/**' | |
- 'tools/generator-go-sdk/**' | |
workflow_dispatch: # for manual invocations | |
concurrency: | |
group: 'regengosdk-${{ github.head_ref }}' | |
cancel-in-progress: true | |
jobs: | |
regenerate-go-sdk: | |
runs-on: custom-linux-large | |
steps: | |
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 | |
- uses: actions/setup-go@93397bea11091df50f3d7e59dc26a7711a8bcfbe # v4.1.0 | |
with: | |
go-version: '1.21.3' | |
- name: Setup .NET | |
uses: actions/setup-dotnet@3447fd6a9f9e57506b15f895c5b76d3b197dc7c2 # v3.2.0 | |
with: | |
dotnet-version: 7.0.x | |
- name: "Build Data API" | |
run: | | |
cd ./data | |
make build | |
- name: "Launch SSH Agent" | |
run: | | |
# launch an ssh agent and export it's env vars | |
ssh-agent -a $SSH_AUTH_SOCK > /dev/null | |
env: | |
SSH_AUTH_SOCK: /tmp/pandora_ssh_agent.sock | |
- name: "Load SSH Key" | |
run: | | |
# load the Deployment Write Key for the Go SDK repository | |
echo "${{ secrets.GOSDK_DEPLOYMENT_WRITE_KEY }}" | ssh-add - | |
env: | |
SSH_AUTH_SOCK: /tmp/pandora_ssh_agent.sock | |
- name: "Run the Go SDK Generator" | |
run: | | |
# go go gadget generator | |
./scripts/automation-generate-and-commit-go-sdk.sh | |
env: | |
SSH_AUTH_SOCK: /tmp/pandora_ssh_agent.sock | |
- name: "Remove the Key from the SSH Agent" | |
if: always() | |
run: | | |
# remove the ssh key | |
ssh-add -D | |
env: | |
SSH_AUTH_SOCK: /tmp/pandora_ssh_agent.sock | |
- name: "Terminate the SSH Agent" | |
if: always() | |
run: | | |
pkill -9 ssh-agent |