Update Discord data #51
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 Discord data | |
on: | |
schedule: | |
- cron: '9 6 * * *' | |
jobs: | |
update-types: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
submodules: recursive | |
- name: Setup Go | |
uses: actions/setup-go@v4 | |
with: | |
go-version: '1.20' | |
id: go | |
- name: Install | |
run: go mod download | |
- name: Update discord api snapshot | |
run: git submodule update --recursive --remote | |
- name: Generate | |
run: go generate | |
- name: Identify changed files | |
id: changed_files | |
run: echo "::set-output name=changed::$(git status --porcelain | grep .go | wc -l)" | |
- name: Create Pull Request | |
if: steps.changed_files.outputs.changed != 0 | |
uses: peter-evans/create-pull-request@v4 | |
with: | |
commit-message: "chore: update discord values" | |
title: "chore: update generated Discord values" | |
body: | | |
- update snapshot | |
- generate values | |
branch: codegen/auto-generate |