diff --git a/.github/workflows/docker-image.yml b/.github/workflows/docker-image.yml index 8b2ba9b..b8a07bd 100644 --- a/.github/workflows/docker-image.yml +++ b/.github/workflows/docker-image.yml @@ -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) diff --git a/BUILD_RELEASE.md b/BUILD_RELEASE.md new file mode 100644 index 0000000..ca266c9 --- /dev/null +++ b/BUILD_RELEASE.md @@ -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 diff --git a/Dockerfile b/Dockerfile index 08ea80e..2bc32dc 100644 --- a/Dockerfile +++ b/Dockerfile @@ -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" @@ -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"] diff --git a/README.md b/README.md index f2b2a4d..95bb514 100644 --- a/README.md +++ b/README.md @@ -16,7 +16,7 @@ The current version supports .NET 7 ``` yaml - name: SonarScanner for .NET 7 with pull request decoration support - uses: highbyte/sonarscan-dotnet@v2.2.3 + uses: highbyte/sonarscan-dotnet@v2.2.4 with: # The key of the SonarQube project sonarProjectKey: your_projectkey @@ -35,7 +35,7 @@ Also includes test results. ``` yaml - name: SonarScanner for .NET 7 with pull request decoration support - uses: highbyte/sonarscan-dotnet@v2.2.3 + uses: highbyte/sonarscan-dotnet@v2.2.4 with: # The key of the SonarQube project sonarProjectKey: your_projectkey @@ -58,7 +58,7 @@ Also includes test results. ``` yaml - name: SonarScanner for .NET 7 with pull request decoration support - uses: highbyte/sonarscan-dotnet@v2.2.3 + uses: highbyte/sonarscan-dotnet@v2.2.4 with: # The key of the SonarQube project sonarProjectKey: your_projectkey @@ -82,7 +82,7 @@ Also includes test results. ``` yaml - name: SonarScanner for .NET 7 with pull request decoration support - uses: highbyte/sonarscan-dotnet@v2.2.3 + uses: highbyte/sonarscan-dotnet@v2.2.4 with: # The key of the SonarQube project sonarProjectKey: your_projectkey @@ -102,7 +102,7 @@ Also includes test results. ``` yaml - name: SonarScanner for .NET 7 with pull request decoration support - uses: highbyte/sonarscan-dotnet@v2.2.3 + uses: highbyte/sonarscan-dotnet@v2.2.4 with: # The key of the SonarQube project sonarProjectKey: your_projectkey @@ -124,7 +124,7 @@ Also includes test results. ``` yaml - name: SonarScanner for .NET 7 with pull request decoration support - uses: highbyte/sonarscan-dotnet@v2.2.3 + uses: highbyte/sonarscan-dotnet@v2.2.4 with: # The key of the SonarQube project sonarProjectKey: your_projectkey diff --git a/action.yml b/action.yml index 016c50c..98ce677 100644 --- a/action.yml +++ b/action.yml @@ -34,7 +34,7 @@ inputs: runs: using: "docker" - image: "Dockerfile" + image: "docker://ghcr.io/highbyte/sonarscan-dotnet:v2.2.4" branding: icon: 'check-square'