diff --git a/.github/workflows/sonarcloud.yml b/.github/workflows/sonarcloud.yml index 5d42498..0ade806 100644 --- a/.github/workflows/sonarcloud.yml +++ b/.github/workflows/sonarcloud.yml @@ -28,26 +28,15 @@ jobs: - name: Install build essential uses: ./.github/actions/install_deps - - name: Analyze with SonarCloud - - # You can pin the exact commit or the version. - # uses: SonarSource/sonarcloud-github-action@de2e56b42aa84d0b1c5b622644ac17e505c9a049 - uses: SonarSource/sonarcloud-github-action@master + - name: Analyze with SonarCloud + uses: SonarSource/sonarqube-scan-action@v4 env: GITHUB_TOKEN: ${{ secrets.TOKEN_GITHUB }} # Needed to get PR information SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} # Generate a token on Sonarcloud.io, add it to the secrets of this repo with the name SONAR_TOKEN (Settings > Secrets > Actions > add new repository secret) with: # Additional arguments for the sonarcloud scanner - args: - # Unique keys of your project and organization. You can find them in SonarCloud > Information (bottom-left menu) - # mandatory + args: > -Dsonar.projectKey=floryn90 -Dsonar.organization=florin-lungu -Dsonar.sources=src - # optional, default is project base directory - # When you need the analysis to take place in a directory other than the one from which it was launched - #-Dsonar.projectBaseDir= # optional, default is . - # Comma-separated paths to directories containing test source files. - #-Dsonar.tests= # optional. For more info about Code Coverage, please refer to https://docs.sonarcloud.io/enriching/test-coverage/overview/ - # Adds more detail to both client and server-side analysis logs, activating DEBUG mode for the scanner, and adding client-side environment variables and system properties to the server-side log of analysis report processing. - #-Dsonar.verbose= # optional, default is false + \ No newline at end of file diff --git a/src/docker/_base/files.df b/src/docker/_base/files.df index 71c669a..d8ee314 100644 --- a/src/docker/_base/files.df +++ b/src/docker/_base/files.df @@ -1,6 +1,6 @@ FROM base--image--alpine AS fetcher -ADD . /files +COPY . /files RUN chmod a+x /files/**/bin/* /files/**/usr/bin/* RUN chmod a+x /files/pandoc/usr/bin/pandoc diff --git a/src/docker/_base/golang.df b/src/docker/_base/golang.df index cae02de..e3a6388 100644 --- a/src/docker/_base/golang.df +++ b/src/docker/_base/golang.df @@ -2,7 +2,7 @@ FROM base--image--alpine AS fetcher ARG TARGETPLATFORM -ADD _script/golang.sh golang.sh +COPY _script/golang.sh golang.sh #COPY --from=base--files--scripts golang.sh golang.sh RUN sh golang.sh diff --git a/src/docker/_base/hugo.df b/src/docker/_base/hugo.df index 2a2d539..85e4c70 100644 --- a/src/docker/_base/hugo.df +++ b/src/docker/_base/hugo.df @@ -8,7 +8,7 @@ ARG TARGETPLATFORM RUN apt update && apt full-upgrade -y && apt install -y wget #COPY --from=base--files--script /hugo-extended.sh hugo.sh -ADD _script/hugo-extended.sh hugo.sh +COPY _script/hugo-extended.sh hugo.sh RUN sh hugo.sh @@ -30,7 +30,7 @@ ARG TARGETPLATFORM # RUN echo "I am running on $BUILDPLATFORM, building for $TARGETPLATFORM" #COPY --from=base--files--scripts /hugo-standard.sh hugo.sh -ADD _script/hugo-standard.sh hugo.sh +COPY _script/hugo-standard.sh hugo.sh RUN sh hugo.sh diff --git a/src/docker/_base/pandoc.df b/src/docker/_base/pandoc.df index 03c05f6..ada502b 100644 --- a/src/docker/_base/pandoc.df +++ b/src/docker/_base/pandoc.df @@ -2,10 +2,10 @@ FROM base--image--alpine AS fetcher ARG TARGETPLATFORM -ADD _script/pandoc.sh pandoc.sh +COPY _script/pandoc.sh pandoc.sh RUN sh pandoc.sh -ADD pandoc /files +COPY pandoc /files FROM scratch diff --git a/src/docker/_base/sass.df b/src/docker/_base/sass.df index c650f56..33ee83e 100644 --- a/src/docker/_base/sass.df +++ b/src/docker/_base/sass.df @@ -2,7 +2,7 @@ FROM base--image--alpine AS fetcher ARG TARGETPLATFORM -ADD _script/sass.sh sass.sh +COPY _script/sass.sh sass.sh RUN sh sass.sh diff --git a/src/docker/_imports/onbuild.df b/src/docker/_imports/onbuild.df index 7c80d1a..7a813ba 100644 --- a/src/docker/_imports/onbuild.df +++ b/src/docker/_imports/onbuild.df @@ -12,6 +12,7 @@ ONBUILD ENV HUGO_DESTINATION="${HUGO_DESTINATION_ARG:-/target}" \ ONBUILD COPY . /src ONBUILD WORKDIR ${HUGO_DIR:-/src} +ONBUILD USER root ONBUILD RUN chown -R hugo:hugo /src /target ONBUILD USER hugo