name: Update Swagger UI on: schedule: - cron: '0 10 * * *' repository_dispatch: types: [update-swagger-ui] jobs: updateSwagger: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 - name: Get Latest Swagger UI Release id: swagger-ui run: | echo ::set-output name=release_tag::$(curl -sL https://api.github.com/repos/swagger-api/swagger-ui/releases/latest | jq -r ".tag_name") echo ::set-output name=current_tag::$(.*|$TITLE|g" index.html # Update current release echo ${{ steps.swagger-ui.outputs.release_tag }} > swagger-ui.version - name: Create Pull Request uses: peter-evans/create-pull-request@v3 with: commit-message: Update swagger-ui to ${{ steps.swagger-ui.outputs.release_tag }} title: Update SwaggerUI to ${{ steps.swagger-ui.outputs.release_tag }} body: | Updates [swagger-ui][1] to ${{ steps.swagger-ui.outputs.release_tag }} Auto-generated by [create-pull-request][2] [1]: https://github.com/swagger-api/swagger-ui [2]: https://github.com/peter-evans/create-pull-request labels: dependencies, automated pr branch: swagger-ui-updates