diff --git a/Dockerfile b/Dockerfile index 8be4be4..f8b6229 100644 --- a/Dockerfile +++ b/Dockerfile @@ -11,6 +11,17 @@ RUN dotnet build CodeCoverageSummary/CodeCoverageSummary.csproj -c Release -o /a FROM build AS publish RUN dotnet publish CodeCoverageSummary/CodeCoverageSummary.csproj -c Release -o /app/publish +# Label the container +LABEL maintainer="Irongut " +LABEL repository="https://github.com/irongut/CodeCoverageSummary" +LABEL homepage="https://github.com/irongut/CodeCoverageSummary" + +# Label as GitHub Action +LABEL com.github.actions.name="Code Coverage Summary" +LABEL com.github.actions.description="A GitHub Action that reads Cobertura format code coverage files and outputs a summary." +LABEL com.github.actions.icon="book-open" +LABEL com.github.actions.color="purple" + FROM base AS final WORKDIR /app COPY --from=publish /app/publish . diff --git a/action.yml b/action.yml new file mode 100644 index 0000000..a3fb497 --- /dev/null +++ b/action.yml @@ -0,0 +1,31 @@ +name: 'Code Coverage Summary' +author: 'Irongut ' +description: 'A GitHub Action that reads Cobertura format code coverage files and outputs a summary.' +branding: + icon: book-open + color: purple +inputs: + filename: + description: 'Code coverage file to analyse.' + required: true + default: '' + badge: + description: 'Include a badge in the output - true / false (default).' + required: false + format: + description: 'Output Format - markdown or text (default).' + required: false + output: + description: 'Output Type - console (default), file or both.' + required: false +runs: + using: 'docker' + image: 'Dockerfile' + args: + - ${{ inputs.filename }} + - '--badge' + - ${{ inputs.badge }} + - '--format' + - ${{ inputs.format }} + - '--output' + - ${{ inputs.output }}