Skip to content
This repository was archived by the owner on Oct 22, 2025. It is now read-only.

Commit e2a1ee7

Browse files
Fix permissions of .scannerwork directory (#57)
1 parent 5ee47de commit e2a1ee7

3 files changed

Lines changed: 14 additions & 3 deletions

File tree

Dockerfile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,10 @@ ENV LC_ALL="C.UTF-8"
1919

2020
WORKDIR /opt
2121

22-
# https://help.github.com/en/actions/creating-actions/dockerfile-support-for-github-actions#user
23-
USER root
24-
2522
# Prepare entrypoint
2623
COPY entrypoint.sh /entrypoint.sh
2724
RUN chmod +x /entrypoint.sh
25+
COPY cleanup.sh /cleanup.sh
26+
RUN chmod +x /cleanup.sh
2827
ENTRYPOINT ["/entrypoint.sh"]
28+

action.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@ branding:
88
runs:
99
using: docker
1010
image: Dockerfile
11+
entrypoint: "/entrypoint.sh"
12+
post-entrypoint: "/cleanup.sh"
1113
inputs:
1214
args:
1315
description: Additional arguments to the sonarcloud scanner

cleanup.sh

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
#!/bin/bash
2+
3+
set -e
4+
5+
_tmp_file=$(ls "${INPUT_PROJECTBASEDIR}/" | head -1)
6+
PERM=$(stat -c "%u:%g" "${INPUT_PROJECTBASEDIR}/$_tmp_file")
7+
8+
chown -R $PERM "${INPUT_PROJECTBASEDIR}/"
9+

0 commit comments

Comments
 (0)