Skip to content

Commit

Permalink
Merge branch 'meniole-development' into fix/bulk
Browse files Browse the repository at this point in the history
# Conflicts:
#	.github/workflows/update-configuration.yml
  • Loading branch information
gentlementlegen committed Oct 9, 2024
2 parents c748712 + 931d715 commit 22242f7
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 84 deletions.
39 changes: 0 additions & 39 deletions .github/workflows/main.yml

This file was deleted.

50 changes: 5 additions & 45 deletions .github/workflows/update-configuration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,50 +11,10 @@ jobs:
permissions: write-all

steps:
- uses: actions/checkout@v4

- name: Setup node
uses: actions/setup-node@v4
- uses: ubiquity-os/action-update-manifest@main
with:
node-version: "20.10.0"

- name: Install deps and run configuration update
run: |
yarn install --immutable --immutable-cache --check-cache
yarn tsc --noCheck --project tsconfig.json -m commonjs
- name: Update manifest configuration using GitHub Script
uses: actions/github-script@v7
with:
script: |
const fs = require('fs');
const path = require('path');
const { pluginSettingsSchema } = require('./src/types/plugin-inputs');
const manifestPath = path.resolve("${{ github.workspace }}", './manifest.json');
const manifest = JSON.parse(fs.readFileSync(manifestPath, 'utf8'));
const configuration = JSON.stringify(pluginSettingsSchema);
manifest["configuration"] = JSON.parse(configuration);
const updatedManifest = JSON.stringify(manifest, null, 2)
console.log('Updated manifest:', updatedManifest);
fs.writeFileSync(manifestPath, updatedManifest);
- name: Commit and Push generated types
run: |
yarn format:prettier
git config --global user.name 'ubiquity-os[bot]'
git config --global user.email 'ubiquity-os[bot]@users.noreply.github.com'
git add ./manifest.json
if [ -n "$(git diff-index --cached --name-only HEAD)" ]; then
git pull
git commit -m "chore: updated generated configuration" || echo "Lint-staged check failed"
git push origin HEAD:${{ github.ref_name }}
else
echo "No changes to commit"
fi
schema-path: "${{ github.workspace }}/src/types/plugin-inputs.js"
commit-message: "chore: update"
manifest-path: "${{ github.workspace }}/manifest.json"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GPG_PRIVATE_KEY: ${{ secrets.GPG_PRIVATE_KEY }}

0 comments on commit 22242f7

Please sign in to comment.