Merge pull request #95 from 0xldr/2025-11-06-oos-poll #38
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: Update Polls Index | |
| on: | |
| push: | |
| branches: | |
| - main | |
| - testnet | |
| paths: | |
| # Trigger on changes in polls directory | |
| - '**.md' | |
| # Trigger on changes to scripts or workflow | |
| - '.github/workflows/update-index.yml' | |
| - 'scripts/**.ts' | |
| - 'scripts/package.json' | |
| - 'scripts/tsconfig.json' | |
| # Allow for workflows to be manually triggered | |
| workflow_dispatch: | |
| jobs: | |
| update-index: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: write | |
| pull-requests: write | |
| steps: | |
| - name: Check out repository | |
| uses: actions/checkout@v4 | |
| - name: Setup pnpm | |
| uses: pnpm/action-setup@v3 | |
| with: | |
| version: 9 | |
| - name: Set up Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: '20' | |
| cache: 'pnpm' | |
| cache-dependency-path: scripts/pnpm-lock.yaml | |
| - name: Install dependencies | |
| run: pnpm install --frozen-lockfile | |
| working-directory: ./scripts | |
| - name: Generate index files | |
| run: pnpm run generate:polls | |
| working-directory: ./scripts | |
| - name: Create Pull Request | |
| uses: peter-evans/create-pull-request@v7 | |
| with: | |
| title: 'Chore: Update polls index file [skip ci]' | |
| commit-message: 'chore: Update polls index file [skip ci]' | |
| add-paths: | | |
| index.json |