Fetch Swaggers #1070
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Fetch Swaggers | |
on: | |
workflow_dispatch: | |
schedule: | |
- cron: 0 0 * * * | |
jobs: | |
fetch-swaggers: | |
runs-on: ubuntu-latest | |
steps: | |
- name: checking out code | |
uses: actions/checkout@v2 | |
- name: extract git commit data | |
uses: rlespinasse/[email protected] | |
- name: Fetch Software Swagger | |
run: wget -O software-swagger.v3.json https://developer.atlassian.com/cloud/jira/software/swagger.v3.json | |
- name: Prettify Software Swagger | |
run: python -m json.tool software-swagger.v3.json > software-swagger.v3.pretty.json | |
- name: Fetch Platform Swagger | |
run: wget -O platform-swagger.v3.json https://developer.atlassian.com/cloud/jira/platform/swagger-v3.v3.json | |
- name: Prettify Platform Swagger | |
run: python -m json.tool platform-swagger.v3.json > platform-swagger.v3.pretty.json | |
- name: Raise PR | |
uses: peter-evans/create-pull-request@v3 | |
with: | |
branch: "latest" | |
base: main | |
title: "Update Jira Swaggers" | |
committer: ${{ env.GIT_COMMIT_AUTHOR_NAME }} <${{ env.GIT_COMMIT_AUTHOR_EMAIL }}"> | |
author: ${{ env.GIT_COMMIT_AUTHOR_NAME }} <${{ env.GIT_COMMIT_AUTHOR_EMAIL }}"> | |
body: Update Jira Swaggers | |
commit-message: Auto update Jira swaggers | |
token: ${{ secrets.GITHUB_TOKEN }} |