Update schema files every month #38
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: Update schema files every month | |
on: | |
workflow_dispatch: | |
schedule: | |
- cron: "0 0 1 * *" | |
jobs: | |
update-schemas: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Set up Go | |
uses: actions/setup-go@v4 | |
with: | |
go-version: '1.22' | |
- uses: actions/checkout@v4 | |
with: | |
ref: ${{ github.head_ref }} | |
- name: Update Schema | |
run: | | |
go get -u ./... | |
go mod tidy | |
make gen-openapi-schema | |
- name: Get current date | |
id: date | |
run: echo "date=$(date +'%Y-%m-%d-%s')" >> $GITHUB_OUTPUT | |
- uses: stefanzweifel/git-auto-commit-action@v4 | |
with: | |
commit_message: Updated schema files | |
tagging_message: ${{ steps.date.outputs.date }} |