ci: adapt the post merge validation job to track progress in a google… #1
Workflow file for this run
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: Post Merge Validation | ||
| on: | ||
| workflow_call: | ||
| inputs: | ||
| repo: | ||
| description: 'The repo owner/name to process (e.g. MetaMask/metamask-extension)'' | ||
| required: true | ||
| type: string | ||
| start_hour_utc: | ||
| description: 'The hour of the day (UTC) to start processing the PRs merged in main' | ||
| required: true | ||
| type: number | ||
| spreadsheet_id: | ||
| description: 'Google Spreadsheet ID to update' | ||
| required: false | ||
| type: string | ||
| default: '1uSERA-Mczy0pjlrr1vvYG0FZwU65B7TMiQURJXY4tSs' | ||
| lookback_days: | ||
| description: 'Number of days to look back for PRs' | ||
| required: false | ||
| type: number | ||
| default: 2 | ||
| secrets: | ||
| github-token: | ||
| description: 'GitHub token with repo access' | ||
| required: true | ||
| google-application-creds-base64: | ||
| description: 'Base64 encoded Google service account credentials' | ||
| required: true | ||
| jobs: | ||
| post-merge-validation-tracker: | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - name: Checkout repository | ||
| uses: actions/checkout@v4 | ||
| - name: Set up Node.js | ||
| uses: actions/setup-node@v4 | ||
| with: | ||
| node-version-file: ./.nvmrc | ||
| cache-dependency-path: ./yarn.lock | ||
| cache: yarn | ||
| - name: Enable Corepack | ||
| run: corepack enable | ||
| - name: Install dependencies | ||
| run: yarn --immutable | ||
| - name: Run post-merge-validation script | ||
| env: | ||
| SHEET_ID: ${{ inputs.spreadsheet_id }} | ||
| START_HOUR_UTC: ${{ inputs.start_hour_utc }} | ||
| LOOKBACK_DAYS: ${{ inputs.lookback_days }} | ||
| REPO: ${{ inputs.repo }} | ||
| GITHUB_TOKEN: ${{ secrets.github-token }} | ||
| GOOGLE_APPLICATION_CREDENTIALS_BASE64: ${{ secrets.google-application-creds-base64 }} | ||
| run: node .github/scripts/post-merge-validation-tracker.mjs | ||