Upgrade to alpine 3.14
This is to enable alpine 3.14 (#41) again so that builds can use npm 7 formatted package files.
This is a super hacky fix, but I couldn't find a better way around this. For some reason when cdk runs it's running as the user 1001 and group 121, but the "cdk.out" folder gets created as root, which cdk doesn't have permissions to write to. This pre-creates the cdk.out directory and changes the owner of it to 1001 so that cdk can write to it.
I wasn't sure if 1001:121 was static or not, and I couldn't find a way to get it from github, so this figures out the user and group id from the node_modules folder and creates a user and group with those ids.
The other thing I want to try is having Docker run as a different user besides root, but thought I'd share this hacky solution in the meantime.
I'm not convinced this isn't the better way. Trying to get this action to run under a user instead of under root also had a lot of problems. Maybe it would be better to download the aws cli directly instead of through CDK like this other action does? Not sure if that would help.
I've created another branch as an alternative if you like that solution better. Not sure which one is better honestly. That branch runs docker under a user called github instead of as root.
https://github.com/youyo/aws-cdk-github-actions/compare/master...mrmeyers99:alpine-3.14-better