mirror of
https://github.com/sonarsource/sonarcloud-github-action.git
synced 2026-06-08 18:17:13 +00:00
Fix permissions of .scannerwork directory (#57)
This commit is contained in:
parent
5ee47de3c9
commit
e2a1ee7c31
3 changed files with 14 additions and 3 deletions
|
|
@ -19,10 +19,10 @@ ENV LC_ALL="C.UTF-8"
|
||||||
|
|
||||||
WORKDIR /opt
|
WORKDIR /opt
|
||||||
|
|
||||||
# https://help.github.com/en/actions/creating-actions/dockerfile-support-for-github-actions#user
|
|
||||||
USER root
|
|
||||||
|
|
||||||
# Prepare entrypoint
|
# Prepare entrypoint
|
||||||
COPY entrypoint.sh /entrypoint.sh
|
COPY entrypoint.sh /entrypoint.sh
|
||||||
RUN chmod +x /entrypoint.sh
|
RUN chmod +x /entrypoint.sh
|
||||||
|
COPY cleanup.sh /cleanup.sh
|
||||||
|
RUN chmod +x /cleanup.sh
|
||||||
ENTRYPOINT ["/entrypoint.sh"]
|
ENTRYPOINT ["/entrypoint.sh"]
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -8,6 +8,8 @@ branding:
|
||||||
runs:
|
runs:
|
||||||
using: docker
|
using: docker
|
||||||
image: Dockerfile
|
image: Dockerfile
|
||||||
|
entrypoint: "/entrypoint.sh"
|
||||||
|
post-entrypoint: "/cleanup.sh"
|
||||||
inputs:
|
inputs:
|
||||||
args:
|
args:
|
||||||
description: Additional arguments to the sonarcloud scanner
|
description: Additional arguments to the sonarcloud scanner
|
||||||
|
|
|
||||||
9
cleanup.sh
Normal file
9
cleanup.sh
Normal 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}/"
|
||||||
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue