Fix permissions of .scannerwork directory (#57)

This commit is contained in:
Cody Simms 2023-12-08 14:57:12 -06:00 committed by GitHub
commit e2a1ee7c31
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 14 additions and 3 deletions

View file

@ -19,10 +19,10 @@ ENV LC_ALL="C.UTF-8"
WORKDIR /opt
# https://help.github.com/en/actions/creating-actions/dockerfile-support-for-github-actions#user
USER root
# Prepare entrypoint
COPY entrypoint.sh /entrypoint.sh
RUN chmod +x /entrypoint.sh
COPY cleanup.sh /cleanup.sh
RUN chmod +x /cleanup.sh
ENTRYPOINT ["/entrypoint.sh"]

View file

@ -8,6 +8,8 @@ branding:
runs:
using: docker
image: Dockerfile
entrypoint: "/entrypoint.sh"
post-entrypoint: "/cleanup.sh"
inputs:
args:
description: Additional arguments to the sonarcloud scanner

9
cleanup.sh Normal file
View file

@ -0,0 +1,9 @@
#!/bin/bash
set -e
_tmp_file=$(ls "${INPUT_PROJECTBASEDIR}/" | head -1)
PERM=$(stat -c "%u:%g" "${INPUT_PROJECTBASEDIR}/$_tmp_file")
chown -R $PERM "${INPUT_PROJECTBASEDIR}/"