Cross-App Connect — Refresh App Hub cache #4
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Cross-App Connect — Refresh App Hub cache | |
| on: | |
| schedule: | |
| # Daily at 04:13 UTC — odd minute to avoid the top-of-hour rush on | |
| # GitHub-hosted runners, and well before EU/US working hours so a | |
| # follow-up PR is waiting for review when the team comes online. | |
| - cron: '13 4 * * *' | |
| workflow_dispatch: | |
| permissions: | |
| contents: read | |
| concurrency: | |
| # Only one refresh attempt at a time; if a previous PR is still pending | |
| # merge, queueing another would create a duplicate branch tip. | |
| group: ${{ github.workflow }} | |
| cancel-in-progress: false | |
| jobs: | |
| refresh: | |
| name: Regenerate app-hub.json | |
| runs-on: ubuntu-latest | |
| # PR-opening permissions are scoped to this job (zizmor flags them | |
| # as too broad at the workflow level). | |
| permissions: | |
| contents: write | |
| pull-requests: write | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1 | |
| - name: Setup Node | |
| uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4 | |
| with: | |
| node-version-file: .nvmrc | |
| cache: yarn | |
| - name: Install | |
| run: yarn && yarn install:all | |
| - name: Regenerate cache | |
| run: yarn workspace cross-app-connect generate-app-hub | |
| env: | |
| # Raises the GitHub API rate limit from 60/hr (anonymous) | |
| # to 5000/hr so the fetch can cover the full registry | |
| # without throttling. | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Open PR if anything changed | |
| uses: peter-evans/create-pull-request@271a8d0340265f705b14b6d32b9829c1cb33d45e # v7.0.8 | |
| with: | |
| commit-message: | | |
| chore(cross-app-connect): refresh app-hub.json from vechain/app-hub | |
| Auto-generated by the cross-app-connect-refresh-app-hub workflow. | |
| title: 'chore(cross-app-connect): refresh app-hub cache' | |
| body: | | |
| Scheduled refresh of `cross-app-connect/src/app/cross-app/_lib/app-hub.json` from [`vechain/app-hub`](https://github.com/vechain/app-hub). | |
| The cache keys the registry by origin so the transact popup can show | |
| `Confirm token swap on Nubila` instead of a raw URL. This PR appears | |
| whenever a new app is added, an existing one is updated, or one is | |
| removed from the registry. | |
| Review the diff to make sure the changes look like additions you | |
| expected (no surprise deletions, plausible names). Merge when happy. | |
| 🤖 Opened by `.github/workflows/cross-app-connect-refresh-app-hub.yaml`. | |
| branch: chore/refresh-app-hub-cache | |
| base: main | |
| delete-branch: true | |
| labels: | | |
| chore | |
| automated | |
| add-paths: | | |
| cross-app-connect/src/app/cross-app/_lib/app-hub.json |