Nightly #1075
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/cache@v4.2.0 | |
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/create-pull-request@v7.0.6 | |
with: | |
author: GitHub <actions@github.com> | |
committer: GitHub <actions@github.com> | |
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 }} |