sonarcloud-github-action icon indicating copy to clipboard operation
sonarcloud-github-action copied to clipboard

Build-Push Docker image to ghcr.io

Open toindev opened this issue 4 years ago • 2 comments

When running this github actions with uses: sonarsource/sonarcloud-github-action@master, there is a build time of around 17 seconds everytime the action is run.

To shorten this build time I was using a fork, and a build on Docker Hub, to directly pull using uses: docker://toindev/sonarcloud-github-action:latest shaving around 10 seconds on every build (this adds up on a Github org with a number of projects).

Now that Github Actions supports using docker images hosted on the Github Docker Registry, I think it would be nice to have the official actions already built, and be able to uses: docker://ghcr.io/SonarSource/sonarcloud-github-action:latest. It seems to shave 2 or 3 extra seconds as well.

I have purposefully avoided using external actions (beside Github's) to avoid dependencies, and only build on the master branch.

NOTE: For this to work, the "Improved Container Support" must be activated for the SonarSource Organization.

toindev avatar Apr 12 '21 15:04 toindev

Hello, @tom-vanbraband-sonarsource can you have a look at the PRs in this repo please :) ?

toindev avatar Apr 16 '21 12:04 toindev

@claire-villard-sonarsource @nawar-hamo-sonarsource @anita-stanisz-sonarsource could you please add your review?

toindev avatar Sep 15 '22 15:09 toindev

A bit late, but second anniversary of this PR. Can you please have a look @tom-vanbraband-sonarsource or @nawar-hamo-sonarsource ?

toindev avatar Jun 12 '23 12:06 toindev

A bit late, but second anniversary of this PR. Can you please have a look @tom-vanbraband-sonarsource or @nawar-hamo-sonarsource ?

@ivan-murenko-sonarsource : I saw you opened a PR recently. Can you maybe help?

toindev avatar Aug 09 '23 13:08 toindev

Well, I just redid my tests, and since the build has been optimized, there is now at most 1 second shaved when pulling instead of rebuilding the action. Not worth the effort.

toindev avatar Aug 09 '23 14:08 toindev