Skip to content

Commit

Permalink
Feature/prebuild docker image (#23)
Browse files Browse the repository at this point in the history
* Use pre-built docker image
  • Loading branch information
highbyte authored Sep 28, 2023
1 parent e5e5f28 commit a3ec960
Show file tree
Hide file tree
Showing 5 changed files with 31 additions and 9 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/docker-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,6 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: Build the Docker image
run: docker build . --file Dockerfile --tag highbyte/sonarscan-dotnet:$(date +%s)
20 changes: 20 additions & 0 deletions BUILD_RELEASE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Building new release

_TODO: This workflow should be improved_

- Clone the GitHub repository locally
- Create new Git branch (feature/name-of-feature)
- Decide what the new full version number should be. If it's a pre-release, use -beta suffix in version number.
- Build and push docker image
- Authenticate to ghcr.io using [these instructions](https://docs.github.com/en/packages/working-with-a-github-packages-registry/working-with-the-container-registry#authenticating-to-the-container-registry)
- `docker build -t ghcr.io/highbyte/sonarscan-dotnet:v1.0.0 .` where v1.0.0 is the full version number.
- `docker push ghcr.io/highbyte/sonarscan-dotnet:v1.0.0` where v1.0.0 is the full version number.
- Update `action.yml` to point to the new docker tag version,
- Update `README.md` instructions to the new version,
- Push new branch from local repository to GitHub.
- Create [GitHub release](https://github.com/highbyte/sonarscan-dotnet/releases) with the full version number.
- If pre-rerelease (beta), check the Pre-release box.
- Check the box to release it to the GitHub Marketplace.
- Publish the release
- Verify the release from a workflow in another repo using the new version
- If the version is not a pre-release, create a GitHub PR to merge the new branch to master
4 changes: 3 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ LABEL "com.github.actions.description"="Sonarscanner for .NET 7 with pull reques
LABEL "com.github.actions.icon"="check-square"
LABEL "com.github.actions.color"="blue"

LABEL "org.opencontainers.image.source"="https://github.com/highbyte/sonarscan-dotnet"

LABEL "repository"="https://github.com/highbyte/sonarscan-dotnet"
LABEL "homepage"="https://github.com/highbyte"
LABEL "maintainer"="Highbyte"
Expand Down Expand Up @@ -44,6 +46,6 @@ RUN apt-get -q -y autoremove \
&& apt-get -q clean -y \
&& rm -rf /var/lib/apt/lists/* /var/cache/apt/archives/*

ADD entrypoint.sh /entrypoint.sh
COPY entrypoint.sh /entrypoint.sh

ENTRYPOINT ["/entrypoint.sh"]
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ The current version supports .NET 7

``` yaml
- name: SonarScanner for .NET 7 with pull request decoration support
uses: highbyte/[email protected].3
uses: highbyte/[email protected].4
with:
# The key of the SonarQube project
sonarProjectKey: your_projectkey
Expand All @@ -35,7 +35,7 @@ Also includes test results.
``` yaml
- name: SonarScanner for .NET 7 with pull request decoration support
uses: highbyte/[email protected].3
uses: highbyte/[email protected].4
with:
# The key of the SonarQube project
sonarProjectKey: your_projectkey
Expand All @@ -58,7 +58,7 @@ Also includes test results.
``` yaml
- name: SonarScanner for .NET 7 with pull request decoration support
uses: highbyte/[email protected].3
uses: highbyte/[email protected].4
with:
# The key of the SonarQube project
sonarProjectKey: your_projectkey
Expand All @@ -82,7 +82,7 @@ Also includes test results.
``` yaml
- name: SonarScanner for .NET 7 with pull request decoration support
uses: highbyte/[email protected].3
uses: highbyte/[email protected].4
with:
# The key of the SonarQube project
sonarProjectKey: your_projectkey
Expand All @@ -102,7 +102,7 @@ Also includes test results.
``` yaml
- name: SonarScanner for .NET 7 with pull request decoration support
uses: highbyte/[email protected].3
uses: highbyte/[email protected].4
with:
# The key of the SonarQube project
sonarProjectKey: your_projectkey
Expand All @@ -124,7 +124,7 @@ Also includes test results.
``` yaml
- name: SonarScanner for .NET 7 with pull request decoration support
uses: highbyte/[email protected].3
uses: highbyte/[email protected].4
with:
# The key of the SonarQube project
sonarProjectKey: your_projectkey
Expand Down
2 changes: 1 addition & 1 deletion action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ inputs:

runs:
using: "docker"
image: "Dockerfile"
image: "docker://ghcr.io/highbyte/sonarscan-dotnet:v2.2.4"

branding:
icon: 'check-square'
Expand Down

0 comments on commit a3ec960

Please sign in to comment.