Skip to content

Commit

Permalink
Try 3
Browse files Browse the repository at this point in the history
  • Loading branch information
dvacca-onfido committed Feb 27, 2024
1 parent c08c06f commit 9ded090
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions .github/workflows/generate-single-openapi-spec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ on:
branches:
- main
pull_request:
types:
- closed
jobs:
build-single-spec:
runs-on: ubuntu-latest
Expand Down Expand Up @@ -35,7 +37,7 @@ jobs:
commit-single-spec:
runs-on: ubuntu-latest
needs: build-single-spec
if: github.event_name == 'push'
if: ${{ github.event.pull_request.merged || github.repository == 'onfido/onfido-openapi-spec' }}
steps:
- uses: actions/checkout@v4
- uses: actions/download-artifact@v4
Expand All @@ -44,6 +46,7 @@ jobs:
path: generated/artifacts
- name: Commit single-file OpenAPI specifications
run: |
echo "${{github.repository}}"
git --version
if [ -z "$(git status --porcelain=v1 generated/artifacts)" ];
then
Expand All @@ -53,5 +56,4 @@ jobs:
git config user.email "<>"
git status generated/artifacts
git commit -m "Single file specifications refresh" generated/artifacts
git push
fi

0 comments on commit 9ded090

Please sign in to comment.