Skip to content

Commit

Permalink
Call git commands to commit changes
Browse files Browse the repository at this point in the history
  • Loading branch information
dvacca-onfido committed Feb 26, 2024
1 parent 5664e40 commit 965a37d
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 8 deletions.
29 changes: 26 additions & 3 deletions .github/workflows/generate-single-openapi-spec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ on:
- main
pull_request:
jobs:
build-single-files:
build-single-spec:
runs-on: ubuntu-latest
container:
image: openapitools/openapi-generator-cli:v7.3.0
Expand All @@ -17,9 +17,32 @@ jobs:
- name: Install pre-requisites
run: |
apt-get update
apt-get install gettext-base
apt-get install -yqq \
gettext-base
- name: Build single-file Onfido OpenAPI defintions
run: |
./generator/script/generate.sh \
generator/configuration/openapi.yaml \
generator/configuration/openapi-yaml.yaml
generator/configuration/openapi-yaml.yaml
- name: Store generated artifacts
uses: actions/upload-artifact@v2
with:
name: artifacts
path: generated/artifacts
commit-single-spec:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/download-artifact@v2
with:
name: artifacts
- name: Commit changes
run: |
ls -lhA
pwd
git --version
git config user.name "GitHub Actions Bot"
git config user.email "<>"
git status
git tag
git describe
1 change: 1 addition & 0 deletions generated/artifacts/openapi-yaml/openapi/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ info:
contact:
email: [email protected]
name: Onfido
# This comment should disappear
description: The Onfido API
license:
name: MIT
Expand Down
2 changes: 1 addition & 1 deletion generated/artifacts/openapi/openapi.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"info" : {
"contact" : {
"email" : "[email protected]",
"name" : "Onfido"
"name" : "Onfido Test"
},
"description" : "The Onfido API",
"license" : {
Expand Down
4 changes: 0 additions & 4 deletions generator/script/generate.sh
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,4 @@ do
fi
done

pwd
ls *
head ./schemas/workflow_runs/workflow_run_builder.yaml

${OPENAPI_GENERATOR_COMMAND} batch --clean ${GENERATED_CONFIG_FILES}

0 comments on commit 965a37d

Please sign in to comment.