Skip to content

Update dependency upgrades - non-major (#241) #673

Update dependency upgrades - non-major (#241)

Update dependency upgrades - non-major (#241) #673

name: Lint, Check Types
on: push
jobs:
check-types:
name: Lint, Check Types
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
# Disable configuring $GITHUB_TOKEN in local git config
persist-credentials: false
- uses: pnpm/action-setup@v4
- name: Use Node.js
uses: actions/setup-node@v4
with:
node-version: 'lts/*'
cache: 'pnpm'
- run: pnpm install
# Fix Renovate running `pnpm install --recursive` causing `version: 'link:'` for eslint-plugin-upleveled
# https://github.com/renovatebot/renovate/discussions/22458
- name: Fix pnpm lockfile after Renovate pnpm --recursive
run: |
if sed -nE '/^\s+eslint-plugin-upleveled:\n\s+specifier: [0-9.-]+\n\s+version: '\''link:'\''$/q0' pnpm-lock.yaml; then
echo "version: 'link:' found in pnpm-lock.yaml"
pnpm add --save-dev eslint-plugin-upleveled
else
echo "version: 'link:' not found in pnpm-lock.yaml"
exit 0
fi
git add package.json pnpm-lock.yaml
if [ -z "$(git status --porcelain)" ]; then
echo "No changes to commit, exiting"
exit 0
fi
git config user.email github-actions[bot]@users.noreply.github.com
git config user.name github-actions[bot]
git commit -m "Fix pnpm lockfile after Renovate pnpm --recursive"
# Credit for oauth2 syntax is the ad-m/github-push-action GitHub Action:
# https://github.com/ad-m/github-push-action/blob/d91a481090679876dfc4178fef17f286781251df/start.sh#L43-L55
git push https://oauth2:${{ secrets.RENOVATE_PNPM_RECURSIVE_FIX_GITHUB_TOKEN }}@github.com/${{ github.repository }}.git HEAD:${{ github.ref }}
- run: pnpm eslint . --max-warnings 0
- run: pnpm tsc