Skip to content

Commit

Permalink
chore: update CI to prevent extra commits
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewwylde authored Oct 3, 2023
1 parent 80ee7bb commit 769ae04
Showing 1 changed file with 15 additions and 1 deletion.
16 changes: 15 additions & 1 deletion .github/workflows/generate-sdk.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,23 @@ on:
permissions:
contents: write
jobs:
get-changed-files:
name: Get Changed Files
runs-on: ubuntu-latest
outputs:
oas-modified: ${{ steps.oas-modified.outputs.any_modified }}
steps:
- name: Check if `openapi.yaml` has changed
uses: tj-actions/[email protected]
id: oas-modified
with:
files: |
openapi.yaml
generate-js:
name: Generate JavaScript SDK
runs-on: ubuntu-latest
needs: [get-changed-files]
if: needs.get-changed-files.outputs.oas-modified == 'true'
steps:

- uses: actions/checkout@v3
Expand All @@ -34,5 +48,5 @@ jobs:
git config --global user.name "team-devx"
gh pr checkout ${{ github.event.pull_request.number }}
git add src/
git commit --allow-empty -m "Update SDK based on openapi.yaml changes"
git commit -m "chore: build SDK from openapi.yaml changes"
git push

0 comments on commit 769ae04

Please sign in to comment.