build: fix warmup queue #311
This file contains 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
# This is a Github Workflow that runs tests on any push or pull request. | |
# If the tests pass and this is a push to the master branch it also runs Semantic Release. | |
name: Log | |
on: [push] | |
jobs: | |
push: | |
name: Push ${{ github.ref }} | |
runs-on: ubuntu-22.04 | |
steps: | |
- name: Depth | |
run: echo "FETCH_DEPTH=$(echo '${{ toJSON(github.event.commits) }}' | jq 'length | if . < 20 then . + 1 else 0 end')" >> $GITHUB_ENV | |
- name: Checkout | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: ${{ env.FETCH_DEPTH }} | |
- name: Setup Node.js | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 20 | |
- name: Log | |
run: node -e "console.log('commits length=', process.env.FETCH_DEPTH, 'commits=', process.env.COMMITS)" | |
env: | |
COMMITS: ${{ toJSON(github.event.commits) }} |