new-horizons/.github/workflows/update_schemas.yml
2023-11-29 14:09:40 -05:00

43 lines
1.1 KiB
YAML

name: Update Schemas
on:
workflow_call:
inputs:
artifact_name:
required: true
description: "Name of the artifact to download and check against"
type: string
# Prevents schemas from trying to update on old commits
concurrency:
group: "schemas-${{ github.ref }}"
cancel-in-progress: true
jobs:
update_schemas:
runs-on: ubuntu-latest
steps:
- name: Checkout Repo
uses: actions/checkout@v3
with:
token: ${{ secrets.SCHEMAS_TOKEN }}
- name: Download Artifact
uses: actions/download-artifact@v3
with:
name: ${{ inputs.artifact_name }}
path: NewHorizons/Schemas/
- name: Commit Schemas
run: |
git config --local user.email "bwc9876@gmail.com"
git config --local user.name "Ben C"
git add NewHorizons/Schemas/**
git commit -m "Updated Schemas"
- name: Push Schemas
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.SCHEMAS_TOKEN }}
branch: ${{ github.ref }}