Describe the bug
I was trying to set up a new way of building our app with the latest fetched translation from Crowdin.
I added the following action:
- name: ⤵️ Download translation from Crowdin
uses: crowdin/github-action@v1
with:
upload_sources: false
upload_translations: false
download_translations: true
create_pull_request: false
push_translations: false
env:
CROWDIN_PERSONAL_TOKEN: ${{ secrets.CROWDIN_TOKEN }}
Very reasonable, I would say (although it is weird, that creating a PR is the default, instead of opting in.
However, after this step my build failed with:
$ lingui extract && lingui compile
node:internal/process/promises:288
triggerUncaughtException(err, true /* fromPromise */);
^
[Error: EACCES: permission denied, open 'src/locales/en-GB/messages.po'] {
errno: -13,
code: 'EACCES',
syscall: 'open',
path: 'src/locales/en-GB/messages.po'
}
That was unexpected. After adding some more debugging I got to see the file permissions created:
app/src/locales/nl:
total 464K
565681 4.0K drwxr-xr-x 12 runner docker 4.0K May 31 11:01 ..
565689 4.0K drwxr-xr-x 2 runner docker 4.0K May 31 11:04 .
545200 448K -rw-r--r-- 1 root root 448K May 31 11:04 messages.po
545199 8.0K -rw-r--r-- 1 runner docker 5.5K May 31 11:01 countries.json
The .po file is created by Crowdin, the countries.json is from the repo. As we can see the .po file is now belonging to root (not the current user, "runner") and because of that they are no longer writeable explaining the issue above.
To Reproduce
Steps to reproduce the behaviour:
- Download translations files with GitHub action
- Try to open these files for writing
Expected behavior
Downloaded files shoudl have sane default permissions and ownership
Describe the bug
I was trying to set up a new way of building our app with the latest fetched translation from Crowdin.
I added the following action:
Very reasonable, I would say (although it is weird, that creating a PR is the default, instead of opting in.
However, after this step my build failed with:
That was unexpected. After adding some more debugging I got to see the file permissions created:
The .po file is created by Crowdin, the
countries.jsonis from the repo. As we can see the .po file is now belonging to root (not the current user, "runner") and because of that they are no longer writeable explaining the issue above.To Reproduce
Steps to reproduce the behaviour:
Expected behavior
Downloaded files shoudl have sane default permissions and ownership