Skip to content

Commit

Permalink
custom action
Browse files Browse the repository at this point in the history
  • Loading branch information
JungleCatSW committed Nov 17, 2023
1 parent aa5d8bf commit fcd3af0
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 3 deletions.
6 changes: 4 additions & 2 deletions .github/actions/swagger-codegen/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,10 @@ runs:
- ${{ inputs.action }}
- '-i'
- ${{ inputs.input }}
- '-l'
- ${{ inputs.language }}
- '-l python'
- '-o'
- ${{ inputs.output }}
- '-DpackageName=src.cudo_compute'
inputs:
language:
description: Swagger language
Expand Down
10 changes: 9 additions & 1 deletion .github/workflows/workflow-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,17 @@ jobs:
- name: Run Swagger Codegen
uses: ./.github/actions/swagger-codegen
with:
language: python
output: out
input: swagger/public.swagger.json
action: generate
- name: Copy files
run: |
rm -rf src
cp -r out/src src
cp helpers/* src/cudo_compute
echo "import src.cudo_compute.auth_config as AuthConfig" >> src/cudo_compute/__init__.py
echo "import src.cudo_compute.cudo_client as CudoClient" >> src/cudo_compute/__init__.py
rm -rf out
# build:
Expand Down

0 comments on commit fcd3af0

Please sign in to comment.