Check for schema update #29283
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: Check for schema update | |
on: | |
repository_dispatch: | |
types: update-schema | |
schedule: | |
- cron: "0 * * * *" | |
jobs: | |
check_for_update: | |
name: Check for schema update | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Copy deploy key to ~/.ssh | |
env: | |
DEPLOY_KEY: ${{ secrets.DEPLOY_KEY }} | |
run: | | |
mkdir -p ~/.ssh | |
echo "$DEPLOY_KEY" > ~/.ssh/id_rsa | |
chmod 600 ~/.ssh/id_rsa | |
- name: Set up Node 14 | |
uses: actions/setup-node@v1 | |
with: | |
node-version: 14.x | |
- name: Cache npm packages | |
uses: actions/cache@v1 | |
env: | |
cache-name: cache-node-modules | |
with: | |
path: ~/.npm | |
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('tools/update-schema/package-lock.json') }} | |
restore-keys: | | |
${{ runner.os }}-build-${{ env.cache-name }}- | |
${{ runner.os }}-build- | |
${{ runner.os }}- | |
- name: Install npm packages | |
working-directory: ./tools/update-schema | |
run: npm install | |
- name: Run update-schema tool | |
working-directory: ./tools/update-schema | |
env: | |
GITHUB_ACCESS_TOKEN: ${{ secrets.SCHEMABOT_ACCESS_TOKEN }} | |
REPO_WORKING_DIRECTORY: ./working | |
GIT_NAME: schemabot | |
GIT_EMAIL: [email protected] | |
GIT_PRIVATE_KEY_PATH: ~/.ssh/id_rsa | |
NODE_NO_WARNINGS: "1" | |
run: node index |