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 32675d0
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 7 deletions.
30 changes: 27 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,33 @@ 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-${{ github.workflow }}-${{ github.run_id }}-${{ github.run_number }}
path: generated/artifacts
commit-single-spec:
runs-on: ubuntu-latest
needs: build-single-spec
steps:
- uses: actions/checkout@v4
- uses: actions/download-artifact@v2
with:
name: artifacts-${{ github.workflow }}-${{ github.run_id }}-${{ github.run_number }}
path: generated/artifacts
- name: Commit changes
run: |
git --version
git config user.name "GitHub Actions Bot"
git config user.email "<>"
git status --porcelain && git add generated/artifacts && \
git commit -m "Update single file spec"
git status
git log
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}
1 change: 1 addition & 0 deletions openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ info:
version: 3.6.0
contact:
name: Onfido
url: https://onfido.com
email: [email protected]
license:
name: MIT
Expand Down

0 comments on commit 32675d0

Please sign in to comment.