Skip to content

Commit

Permalink
Speakeasy migrate workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
Nishu Goel committed Nov 5, 2024
1 parent 278a527 commit d8f0401
Show file tree
Hide file tree
Showing 8 changed files with 39 additions and 38 deletions.
44 changes: 18 additions & 26 deletions .github/workflows/speakeasy_sdk_generation.yml
Original file line number Diff line number Diff line change
@@ -1,28 +1,20 @@
name: Generate

on:
workflow_dispatch: # Allows manual triggering of the workflow to generate SDK
inputs:
force:
description: "Force generation of SDKs"
type: boolean
default: false
schedule:
- cron: 0 0 * * * # Runs every day at midnight

"on":
workflow_dispatch:
inputs:
force:
description: Force generation of SDKs
type: boolean
default: false
schedule:
- cron: 0 0 * * *
jobs:
generate:
uses: speakeasy-api/sdk-generation-action/.github/workflows/sdk-generation.yaml@v14
with:
speakeasy_version: latest
openapi_docs: |
- https://docs.api.epilot.io/journey-config.yaml
overlay_docs: |
- ./overlay.yaml
languages: |
- terraform
mode: pr
force: ${{ github.event.inputs.force }}
secrets:
github_access_token: ${{ secrets.GITHUB_TOKEN }}
speakeasy_api_key: ${{ secrets.SPEAKEASY_API_KEY }}
generate:
uses: speakeasy-api/sdk-generation-action/.github/workflows/workflow-executor.yaml@v15
with:
force: ${{ github.event.inputs.force }}
mode: pr
speakeasy_version: latest
secrets:
github_access_token: ${{ secrets.GITHUB_TOKEN }}
speakeasy_api_key: ${{ secrets.SPEAKEASY_API_KEY }}
8 changes: 4 additions & 4 deletions .speakeasy/gen.lock
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
lockVersion: 2.0.0
id: 1afd37bc-cea9-4679-ac40-35ad5de414fc
management:
docChecksum: 04a3050621ded238f3a9de9b2dffa68e
docChecksum: 04807008fa1d02e1883841236df05d67
docVersion: 1.0.0
speakeasyVersion: 1.420.0
speakeasyVersion: 1.422.1
generationVersion: 2.438.15
releaseVersion: 0.6.1
configChecksum: 6cb24f2267a84f0fac68d08055352b05
releaseVersion: 0.6.2
configChecksum: 5d40911bc7fc6e376cbb0582064c59dd
repoURL: https://github.com/epilot-dev/terraform-provider-epilot-journey.git
repoSubDirectory: .
published: true
Expand Down
9 changes: 9 additions & 0 deletions .speakeasy/workflow.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
workflowVersion: 1.0.0
sources:
my-source:
inputs:
- location: https://docs.api.epilot.io/journey-config.yaml
targets:
terraform:
target: terraform
source: my-source
8 changes: 4 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
all: speakeasy docs

original.yaml:
# curl https://docs.api.epilot.io/journey-config.yaml > original.yaml
cp openapi.yml original.yaml
curl https://docs.api.epilot.io/journey-config.yaml > original.yaml
# cp openapi.yml original.yaml

original_modified.yaml: original.yaml overlay.yaml
speakeasy overlay apply -s original.yaml -o overlay.yaml > original_modified.yaml
Expand All @@ -13,9 +13,9 @@ overlay.yaml:

speakeasy:
$(eval TMP := $(shell mktemp -d))
# curl https://docs.api.epilot.io/journey-config.yaml > $(TMP)/openapi.yaml
curl https://docs.api.epilot.io/journey-config.yaml > $(TMP)/openapi.yaml

cp openapi.yml $(TMP)/openapi.yaml
#cp openapi.yml $(TMP)/openapi.yaml
speakeasy overlay apply -s $(TMP)/openapi.yaml -o overlay.yaml > $(TMP)/final.yaml
speakeasy generate sdk --lang terraform -o . -s $(TMP)/final.yaml

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ terraform {
required_providers {
epilot-journey = {
source = "epilot-dev/epilot-journey"
version = "0.6.1"
version = "0.6.2"
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ terraform {
required_providers {
epilot-journey = {
source = "epilot-dev/epilot-journey"
version = "0.6.1"
version = "0.6.2"
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion examples/provider/provider.tf
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ terraform {
required_providers {
epilot-journey = {
source = "epilot-dev/epilot-journey"
version = "0.6.1"
version = "0.6.2"
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion gen.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ generation:
sdkFlattening: true
telemetryEnabled: false
terraform:
version: 0.6.1
version: 0.6.2
additionalDataSources: []
additionalDependencies: {}
additionalResources: []
Expand Down

0 comments on commit d8f0401

Please sign in to comment.