diff --git a/.github/workflows/update-openapi.yml b/.github/workflows/update-openapi.yml index 7d83b663d..fd56dd9c1 100644 --- a/.github/workflows/update-openapi.yml +++ b/.github/workflows/update-openapi.yml @@ -16,9 +16,16 @@ jobs: with: token: ${{ secrets.GITHUB_TOKEN }} - name: Update OpenAPI Spec + id: sync-openapi uses: fern-api/sync-openapi@v2 with: token: ${{ secrets.GITHUB_TOKEN }} branch: 'update-openapi-spec' update_from_source: true - add_timestamp: true \ No newline at end of file + add_timestamp: true + - name: Enable auto-merge + if: steps.sync-openapi.outputs.pr_number != '' + env: + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: | + gh pr merge ${{ steps.sync-openapi.outputs.pr_number }} --auto --squash