diff --git a/.github/workflows/status.yml b/.github/workflows/status.yml index 9dd6986c..0470aa1e 100644 --- a/.github/workflows/status.yml +++ b/.github/workflows/status.yml @@ -9,18 +9,24 @@ jobs: matrix: node-version: [16.x] steps: - - uses: actions/checkout@v1 - with: - # Checkout the head ref instead of the PR branch that github creates. - ref: ${{ github.head_ref }} - - name: Use Node.js ${{ matrix.node-version }} - uses: actions/setup-node@v1 - with: - node-version: ${{ matrix.node-version }} - - name: Install and build - run: | - npm install - - name: Run status checks - run: node ./status-checks - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + - uses: actions/checkout@v2 + with: + ref: ${{ github.event.pull_request.head.sha }} + - name: Use Node.js ${{ matrix.node-version }} + uses: actions/setup-node@v1 + with: + node-version: ${{ matrix.node-version }} + - name: Use Cache + uses: actions/cache@v2 + with: + path: | + node_modules + */*/node_modules + key: ${{ runner.os }}-${{ matrix.node_version }}-${{ hashFiles('**/package-lock.json') }} + - name: Install and build + run: | + npm install + - name: Run status checks + run: node ./status-checks + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}