chore: fixes, converting to docker action

This commit is contained in:
2025-03-28 00:36:50 +02:00
parent a3514981f5
commit f5001f32b7
2 changed files with 11 additions and 11 deletions

View File

@@ -1,13 +1,9 @@
FROM golang:1.24-alpine AS build
RUN useradd -m appuser
USER appuser
WORKDIR /app
COPY . .
RUN go build -o /go-test-sarif ./cmd/main.go
FROM alpine:3.21.3
RUN useradd -m appuser
USER appuser
COPY --from=build /go-test-sarif /go-test-sarif
COPY action/entrypoint.sh /entrypoint.sh
RUN chmod +x /entrypoint.sh

View File

@@ -1,6 +1,11 @@
name: 'Go Test to SARIF Converter'
description: 'Converts Go test JSON output to SARIF format.'
author: 'Ismo Vuorinen'
branding:
icon: "check"
color: "green"
inputs:
input_file:
description: 'Path to the Go test JSON results file.'
@@ -8,11 +13,10 @@ inputs:
output_file:
description: 'Path where the SARIF output should be saved.'
required: true
runs:
using: 'composite'
steps:
- name: Convert Go test results to SARIF
uses: ivuorinen/go-test-sarif-action@58ffaaacdb178a5d053f8e8c2693966422a3ecda # v1
with:
input_file: ${{ inputs.input_file }}
output_file: ${{ inputs.output_file }}
using: "docker"
image: "docker://ivuorinen/go-test-sarif-action:v1"
with:
input_file: ${{ inputs.input_file }}
output_file: ${{ inputs.output_file }}