-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(git): Implement Python Executor. (#149)
PR: #149
- Loading branch information
1 parent
c8033b3
commit c7947ff
Showing
10 changed files
with
118 additions
and
89 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
name: Download API Specs | ||
on: | ||
workflow_call: | ||
inputs: | ||
url: | ||
description: 'URL to download API specs from' | ||
required: true | ||
type: string | ||
|
||
jobs: | ||
download_specs: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- id: download_specs | ||
run: | | ||
curl -L ${{ inputs.url }} -o raw-specs.yaml | ||
- uses: actions/upload-artifact@v3 | ||
with: | ||
name: raw-specs | ||
path: raw-specs.yaml |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
name: Generate and Publish Sources | ||
on: | ||
workflow_call: | ||
inputs: | ||
name: | ||
description: 'SDK Name' | ||
required: true | ||
type: string | ||
version: | ||
description: 'SDK Version' | ||
required: true | ||
type: string | ||
|
||
jobs: | ||
publish: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/download-artifact@v3 | ||
with: | ||
name: sdk | ||
path: openworld/sdk/generator/package | ||
- uses: actions/download-artifact@v3 | ||
with: | ||
name: specs | ||
path: openworld/sdk/generator/package | ||
- name: Publish Code | ||
working-directory: openworld/sdk/generator/package | ||
run: | | ||
git config --global user.email "oss@expediagroup.com" | ||
git config --global user.name "Expedia Group Open Source" | ||
rm -rf ../../../../release/"${{github.event.inputs.name}}" | ||
mkdir -p ../../../../release/"${{github.event.inputs.name}}" | ||
tar -xzf *.tar.gz | ||
rm *.tar.gz | ||
find ./ -name \*.py -exec cp {} ../../../../release/"${{github.event.inputs.name}}"/ \; | ||
find ./ -name \*.yaml -exec cp {} ../../../../release/"${{github.event.inputs.name}}"/ \; | ||
git fetch --depth=1 origin main | ||
git checkout -b "${{github.event.inputs.name}}-${{github.event.inputs.version}}" | ||
git add ../../../../release/\* | ||
git commit -m "chore: Publish ${{github.event.inputs.name}} [${{github.event.inputs.version}}] SDK" | ||
git push --set-upstream origin "${{github.event.inputs.name}}-${{github.event.inputs.version}}" | ||
gh pr create -B main -H "${{github.event.inputs.name}}-${{github.event.inputs.version}}" --title 'chore: Publish ${{github.event.inputs.name}} [${{github.event.inputs.version}}] SDK' --fill | ||
env: | ||
GH_TOKEN: ${{ github.token }} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
name: Transform Specs | ||
on: | ||
workflow_call: | ||
inputs: | ||
configurations: | ||
description: 'Spec Transformer CLI Configurations' | ||
type: string | ||
required: true | ||
|
||
jobs: | ||
transform-specs: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/download-artifact@v3 | ||
with: | ||
name: raw-specs | ||
- run: | | ||
npx --yes -p @expediagroup/spec-transformer cli ${{ inputs.configurations }} -i raw-specs.yaml -o specs.yaml | ||
- uses: actions/upload-artifact@v3 | ||
with: | ||
name: specs | ||
path: specs.yaml |
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
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
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
This file was deleted.
Oops, something went wrong.