Files
backstage/.github/workflows/mui-migration-tracker.yml
T
Fredrik Adelöw ebcc8b7ca9 ci: enable corepack in setup-node steps
The actions/setup-node@v6.4.0 upgrade stopped auto-shimming yarn onto
PATH via corepack. The yarn-plugin test spawns yarn via Node's
child_process.spawn() which does a raw PATH lookup, causing
ENOENT failures. Adding corepack: true ensures the yarn shim is
available.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Signed-off-by: Fredrik Adelöw <freben@gmail.com>
2026-05-28 10:20:37 +02:00

72 lines
2.2 KiB
YAML

name: MUI to BUI Migration Tracker
on:
schedule:
# Run daily at midnight UTC
- cron: '0 0 * * *'
workflow_dispatch:
# Allow manual triggering
permissions:
issues: write
contents: read
jobs:
update-migration-progress:
runs-on: ubuntu-latest
name: Update Migration Progress Issue
steps:
- name: Harden Runner
uses: step-security/harden-runner@58077d3c7e43986b6b15fba718e8ea69e387dfcc # v2.15.1
with:
egress-policy: audit
- name: Checkout repository
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
- name: Setup Node.js
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
with:
node-version: 22.x
registry-url: https://registry.npmjs.org/ # Needed for auth
corepack: true
- name: yarn install
uses: backstage/actions/yarn-install@2cd6978b476cbdc39fec48346f8b6ca13199dd6a # v0.7.8
with:
cache-prefix: ${{ runner.os }}-v22.x
- name: Run migration analysis
id: analysis
run: |
# Run the migration script and save markdown output
yarn mui-to-bui --markdown > migration-report.md
# Read the report into an environment variable (escape for GitHub Actions)
echo "REPORT<<EOF" >> $GITHUB_ENV
cat migration-report.md >> $GITHUB_ENV
echo "EOF" >> $GITHUB_ENV
- name: Update GitHub Issue
uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
script: |
const issueNumber = 31467;
const reportBody = process.env.REPORT;
try {
await github.rest.issues.update({
owner: context.repo.owner,
repo: context.repo.repo,
issue_number: issueNumber,
body: reportBody
});
console.log(`✅ Successfully updated issue #${issueNumber}`);
} catch (error) {
console.error(`❌ Error updating issue: ${error.message}`);
throw error;
}