Fixes from E2E Testing #22
Workflow file for this run
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: Build SDK | |
on: | |
pull_request: | |
branches: [ main ] | |
workflow_dispatch: | |
permissions: | |
contents: write | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
with: | |
repository: ${{ github.event.pull_request.head.repo.full_name }} | |
ref: ${{ github.event.pull_request.head.ref }} | |
- name: Merge the OpenAPI Specs | |
run: | | |
chmod +x merge.sh # Make the script executable | |
./merge.sh | |
continue-on-error: false # Stop the workflow if merge.sh returns a non-zero exit code | |
- name: Build SDK from OpenApi Spec | |
run: | | |
chmod +x build-sdk.sh # Make the script executable | |
./build-sdk.sh | |
continue-on-error: false # Stop the workflow if build-sdk.sh returns a non-zero exit code | |
- name: Swith to publish .gitignore | |
run: | | |
cp .gitignore .gitignore.local | |
cp .gitignore.pub .gitignore | |
continue-on-error: false | |
- name: Commit SDK updates | |
uses: EndBug/add-and-commit@v9 | |
with: | |
# The arguments for the `git add` command (see the paragraph below for more info) | |
# Default: '.' | |
add: 'open-api-spec.yml guardrails-api-client' | |
# The name of the user that will be displayed as the author of the commit. | |
# Default: depends on the default_author input | |
author_name: ${{ github.event.pull_request.user.login }} | |
# The email of the user that will be displayed as the author of the commit. | |
# Default: depends on the default_author input | |
author_email: ${{ github.event.pull_request.user.email }} | |
# The message for the commit. | |
# Default: 'Commit from GitHub Actions (name of the workflow)' | |
message: 'update generated sdk' | |
# The way the action should handle pathspec errors from the add and remove commands. Three options are available: | |
# - ignore -> errors will be logged but the step won't fail | |
# - exitImmediately -> the action will stop right away, and the step will fail | |
# - exitAtEnd -> the action will go on, every pathspec error will be logged at the end, the step will fail. | |
# Default: ignore | |
pathspec_error_handling: exitAtEnd | |
# Whether to push the commit and, if any, its tags to the repo. It can also be used to set the git push arguments (see the paragraph below for more info) | |
# Default: true | |
push: true |