Update Actions (#445)

Bc of branch protection rules the default actions token can't push to
`main`, which screws up a lot. So this PR uses a PAT i generated to push
schemas instead bc I can bypass those restrictions.
This commit is contained in:
Will Corby 2022-11-15 20:12:21 -08:00 committed by GitHub
commit 078fc2ce3b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 9 additions and 5 deletions

View File

@ -23,3 +23,4 @@ jobs:
uses: './.github/workflows/update_schemas.yml' uses: './.github/workflows/update_schemas.yml'
with: with:
artifact_name: NewHorizons-Schemas-Debug artifact_name: NewHorizons-Schemas-Debug
secrets: inherit

View File

@ -34,6 +34,7 @@ jobs:
uses: ./.github/workflows/update_schemas.yml uses: ./.github/workflows/update_schemas.yml
with: with:
artifact_name: NewHorizons-Schemas-Release artifact_name: NewHorizons-Schemas-Release
secrets: inherit
Update_Docs: Update_Docs:
name: 'Update Docs' name: 'Update Docs'
needs: Build needs: Build

View File

@ -19,6 +19,8 @@ jobs:
steps: steps:
- name: Checkout Repo - name: Checkout Repo
uses: actions/checkout@v3 uses: actions/checkout@v3
with:
token: ${{ secrets.SCHEMAS_TOKEN }}
- name: Download Artifact - name: Download Artifact
uses: actions/download-artifact@v3 uses: actions/download-artifact@v3
@ -28,13 +30,13 @@ jobs:
- name: Commit Schemas - name: Commit Schemas
run: | run: |
git config --local user.email "github-actions[bot]@users.noreply.github.com" git config --local user.email "bwc9876@gmail.com"
git config --local user.name "github-actions[bot]" git config --local user.name "Ben C"
git add NewHorizons/Schemas/** git add NewHorizons/Schemas/**
git commit -m "Updated Schemas" git commit -m "Updated Schemas"
- name: Push Schemas - name: Push Schemas
uses: ad-m/github-push-action@master uses: ad-m/github-push-action@master
with: with:
github_token: ${{ secrets.github_token }} github_token: ${{ secrets.SCHEMAS_TOKEN }}
branch: ${{ github.ref }} branch: ${{ github.ref }}

View File

@ -11,7 +11,7 @@ using Logger = NewHorizons.Utility.Logger;
namespace NewHorizons.External.Configs namespace NewHorizons.External.Configs
{ {
/// <summary> /// <summary>
/// Describes a body to generate /// Describes a celestial body to generate
/// </summary> /// </summary>
[JsonObject(Title = "Celestial Body")] [JsonObject(Title = "Celestial Body")]
public class PlanetConfig public class PlanetConfig

View File

@ -2,7 +2,7 @@
"$schema": "http://json-schema.org/draft-04/schema#", "$schema": "http://json-schema.org/draft-04/schema#",
"title": "Celestial Body Schema", "title": "Celestial Body Schema",
"type": "object", "type": "object",
"description": "Describes a body to generate", "description": "Describes a celestial body to generate",
"additionalProperties": false, "additionalProperties": false,
"required": [ "required": [
"name" "name"