Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
FROM golang:1.20-alpine as builder

WORKDIR /build
RUN apk add --no-cache upx
COPY go.mod .
RUN go mod download -x
COPY . .
RUN go build -trimpath -o bin/mirror ./cmd/mirror
RUN upx --brute /build/bin/mirror


FROM golang:1.20-alpine as base
WORKDIR /
COPY --from=builder /build/bin/mirror mirror
VOLUME /app
WORKDIR /app
ENTRYPOINT ["/mirror" ]
20 changes: 20 additions & 0 deletions action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: mirror-linter
description: Runs the Go's mirror linter that checks string/[]byte performance busts
author: "@butuzov"

inputs:
with-tests:
required: false
description: Also check tests...
default: false

runs:
using: docker
image: Dockerfile
args:
- '--with-tests'
- ./...

branding:
icon: 'check-circle'
color: 'blue'