trigger-frontend-updates:typescript@5.9.2 #39
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: Frontend Updates runner | |
| on: | |
| push: | |
| branches: | |
| - main | |
| paths: | |
| - ".github/workflows/frontend-updates-runner.yml" | |
| - "packages/frontend-updates-runner/**" | |
| jobs: | |
| frontend-updates-runner: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| path: frontend-updates-runner | |
| - name: Install pnpm | |
| uses: pnpm/action-setup@v4 | |
| with: | |
| package_json_file: frontend-updates-runner/package.json | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: lts/* | |
| cache: "pnpm" | |
| cache-dependency-path: frontend-updates-runner/pnpm-lock.yaml | |
| - name: Install corepack | |
| run: | | |
| npm install --global corepack@latest | |
| corepack enable | |
| - name: Install dependencies | |
| run: | | |
| cd frontend-updates-runner | |
| pnpm install | |
| - name: Get last commit message | |
| id: commit | |
| run: | | |
| cd frontend-updates-runner | |
| echo "commit_message=$(git log -1 --pretty=%B)" >> $GITHUB_ENV | |
| - name: Import GPG key | |
| run: | | |
| echo "$GPG_PRIVATE_KEY" | gpg --batch --import | |
| env: | |
| GPG_PRIVATE_KEY: ${{ secrets.ENV_GPG_PRIVATE_KEY }} | |
| - name: Configure git to sign | |
| run: | | |
| git config --global user.signingkey "${{ secrets.ENV_GPG_KEY_ID }}" | |
| git config --global commit.gpgsign true | |
| git config --global gpg.program gpg | |
| - name: Run frontend updates runner | |
| if: contains(env.commit_message, 'trigger-frontend-updates') | |
| env: | |
| ENV_GITHUB_APP_ID: ${{ secrets.ENV_GITHUB_APP_ID }} | |
| ENV_GITHUB_PRIVATE_KEY: ${{ secrets.ENV_GITHUB_PRIVATE_KEY }} | |
| ENV_COMMIT_MESSAGE: ${{ env.commit_message }} | |
| run: | | |
| cd frontend-updates-runner/packages/frontend-updates-runner | |
| npx tsx src/update-depency-in-repos.ts |