Nightly #964
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: Nightly | |
on: | |
workflow_dispatch: | |
schedule: | |
- cron: '36 7 * * *' | |
jobs: | |
update-schema: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: tibdex/github-app-token@v1 | |
id: generate-token | |
with: | |
app_id: ${{ secrets.APP_ID }} | |
private_key: ${{ secrets.APP_PRIVATE_KEY }} | |
- name: Checkout latest code | |
uses: actions/checkout@v4 | |
- name: Install Go | |
uses: actions/setup-go@v5 | |
with: | |
go-version: 1.23.x | |
- name: Get Go environment | |
id: go-env | |
run: | | |
echo "::set-output name=cache::$(go env GOCACHE)" | |
echo "::set-output name=modcache::$(go env GOMODCACHE)" | |
- name: Set up cache | |
uses: actions/[email protected] | |
with: | |
path: | | |
${{ steps.go-env.outputs.cache }} | |
${{ steps.go-env.outputs.modcache }} | |
key: update-schema-${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} | |
restore-keys: | | |
update-schema-${{ runner.os }}-go- | |
- name: Update schema | |
id: update-schema | |
run: | | |
make update_schema | tee output.txt | |
echo "::set-output name=output::$(cat output.txt)" | |
rm output.txt | |
- name: Create PR | |
id: cpr | |
uses: peter-evans/[email protected] | |
with: | |
author: GitHub <[email protected]> | |
committer: GitHub <[email protected]> | |
commit-message: 'feat(schema): update documentation to the latest layer' | |
branch: "feat/update-schema" | |
delete-branch: true | |
token: ${{ steps.generate-token.outputs.token }} | |
title: "feat(schema): update documentation to the latest layer" | |
body: | | |
Update schema documentation to the latest layer. | |
``` | |
${{ steps.update-schema.outputs.output }} | |
``` | |
- uses: peter-evans/enable-pull-request-automerge@v3 | |
if: steps.cpr.outputs.pull-request-number > 0 | |
with: | |
token: ${{ steps.generate-token.outputs.token }} | |
pull-request-number: ${{ steps.cpr.outputs.pull-request-number }} |