mirror of
https://gitea.com/gitea/docs.git
synced 2026-09-17 19:55:34 +00:00
31 lines
1.0 KiB
YAML
31 lines
1.0 KiB
YAML
name: update swagger
|
|
run-name: update swagger
|
|
|
|
on:
|
|
schedule:
|
|
- cron: '0 */12 * * *' # every 12 hours on the hour
|
|
workflow_dispatch:
|
|
|
|
jobs:
|
|
update-swagger:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- run: |
|
|
wget https://github.com/go-gitea/gitea/blob/main/templates/swagger/v1_json.tmpl
|
|
sed -i "$@" 's/"version": "{{AppVer | JSEscape | Safe}}"/"version": "dev"/' static/swagger-latest.json
|
|
|
|
wget https://github.com/go-gitea/gitea/blob/v1.22.2/templates/swagger/v1_json.tmpl
|
|
sed -i "$@" 's/"version": "{{AppVer | JSEscape | Safe}}"/"version": "1.22.2"/' static/swagger-1.22.json
|
|
|
|
- name: push swagger to repo
|
|
uses: appleboy/[email protected]
|
|
with:
|
|
author_email: "[email protected]"
|
|
author_name: GiteaBot
|
|
branch: main
|
|
commit: true
|
|
commit_message: "[skip ci] Updated swagger files"
|
|
remote: "[email protected]:gitea/docs.git"
|
|
ssh_key: ${{ secrets.DEPLOY_KEY }}
|