Skip to content

Make environment readonly #39

Make environment readonly

Make environment readonly #39

name: Changeset PR check
on:
pull_request:
branches: [main]
env:
pnpm-version: 8
node-version: 20
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
concurrency: ${{ github.workflow }}-${{ github.ref }}
jobs:
check:
runs-on: ubuntu-latest
if: ${{ !contains(github.head_ref, 'changeset-release') }}
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Cache pnpm modules
uses: actions/[email protected]
with:
path: ~/.pnpm-store
key: ${{ runner.os }}-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-
- name: Install pnpm
uses: pnpm/[email protected]
with:
version: ${{ env.pnpm-version }}
- uses: actions/[email protected]
with:
node-version: ${{ env.node-version }}
cache: pnpm
- name: Install dependencies
run: pnpm install
- name: Require changeset
run: |
# Checkout PR head commit instead of merge commit
# See: https://github.com/atlassian/changesets/issues/517
git checkout ${{ github.event.pull_request.head.sha }}
pnpm changeset status --since=origin/main