name: Build
on:
  push:
    branches: [ $default-branch ]
  pull_request:
    branches: [ $default-branch ]
jobs:
  build:
    runs-on: ubuntu-latest
    steps:
    - uses: actions/checkout@v2
    - name: Use Node.js
      uses: actions/setup-node@v1
      with:
        node-version: '12.x'
    - name: Cache Node.js modules
      uses: actions/cache@v2
      with:
        path: ~/.npm
        key: node-${{ hashFiles('**/package-lock.json') }}
        restore-keys:
          node-
    - name: Install dependencies
      run: npm install
    - name: Test and build
      run: npm run build:all

name: Build
on:
  push:
    branches: [ master ]
  pull_request:
    branches: [ master ]
jobs:
  build:
    runs-on: ubuntu-latest
    steps:
    - uses: actions/checkout@v2
    - name: Use Node.js
      uses: actions/setup-node@v1
      with:
        node-version: '12.x'
    - name: Cache Node.js modules
      uses: actions/cache@v2
      with:
        path: ~/.npm
        key: node-${{ hashFiles('**/package-lock.json') }}
        restore-keys:
          node-
    - name: Install dependencies
      run: npm install
    - name: Test and build
      run: npm run build:all

Use concrete branch name for Actions workflow
fix: Use concrete branch name for Actions workflow