Skip to content

Commit

Permalink
chore: test all in actions
Browse files Browse the repository at this point in the history
  • Loading branch information
gentlementlegen committed Oct 2, 2024
1 parent 242a671 commit c6d3c97
Showing 1 changed file with 26 additions and 2 deletions.
28 changes: 26 additions & 2 deletions .github/workflows/validate-schema.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,31 @@ jobs:
- name: Install deps and run configuration update
run: |
yarn install --immutable --immutable-cache --check-cache
yarn tsx src/update-configuration.ts
- name: Update manifest configuration using GitHub Script
uses: actions/github-script@v7
with:
script: |
const fs = require('fs');
const path = require('path');
// Load the plugin settings schema from the types file
const { pluginSettingsSchema } = require('./src/types');
// Read and parse the manifest file
const manifestPath = path.resolve(__dirname, './manifest.json');
const manifest = JSON.parse(fs.readFileSync(manifestPath, 'utf8'));
// Stringify the plugin settings schema and add it to the manifest
const configuration = JSON.stringify(pluginSettingsSchema);
console.log('Updated configuration:', configuration);
// Add or update the configuration key in the manifest
manifest["configuration"] = JSON.parse(configuration);
// Write the updated manifest back to the file
fs.writeFileSync(manifestPath, JSON.stringify(manifest, null, 2));
console.log('Manifest updated successfully');
- name: Commit and Push generated types
run: |
Expand All @@ -35,4 +59,4 @@ jobs:
echo "No changes to commit"
fi
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 comments on commit c6d3c97

Please sign in to comment.