Webpack cannot write build files in Github Action Docker container

I’m trying to run a build step inside a Docker container during my Github Action but running into some permission errors.

Here are the relevant bits from my action file:

jobs:
  tests:
    runs-on: ubuntu-latest
    container:
      image: chilio/laravel-dusk-ci:latest

    steps:
    - uses: actions/checkout@v2
    - uses: actions/setup-node@v2
    - name: Install
      run: npm install
    - name: Prod
      run: npm run production <- Fails here

The given error:

Run npm run production

> @ production /__w/community-management/community-management
> cross-env mix --production

ℹ Compiling Mix
[webpack-cli] [Error: EACCES: permission denied, open '/__w/community-management/community-management/resources/assets/js/lib/services/search/ArrayObjectSearch.d.ts'] {
  errno: -13,
  code: 'EACCES',
  syscall: 'open',
  path: '/__w/community-management/community-management/resources/assets/js/lib/services/search/ArrayObjectSearch.d.ts'
}

I can create files with the root user from within the container when just running a step like so:

steps:
- name: Test
  run: touch create.js

It seems like something is preventing Webpack from being able to write these files. Locally everything works as expected.

Any insight? Much appreciated.