Skip to content

Commit

Permalink
Update action files
Browse files Browse the repository at this point in the history
  • Loading branch information
posener committed Apr 27, 2020
1 parent 2f57a3d commit 07fe9c5
Show file tree
Hide file tree
Showing 2 changed files with 65 additions and 63 deletions.
15 changes: 8 additions & 7 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@

FROM golang:1.14.1-alpine3.11
RUN apk add git

ADD . /home/goreadme
WORKDIR /home/goreadme
RUN go install ./cmd/goreadme
COPY . /home/src
WORKDIR /home/src
RUN go build -o /bin/action ./cmd/action

FROM alpine:3.11
RUN apk add git curl jq
COPY --from=0 /go/bin/goreadme /bin/goreadme
RUN apk add git
COPY --from=0 /bin/action /bin/action

ADD .github/entrypoint.sh /entrypoint.sh
ENTRYPOINT [ "/entrypoint.sh" ]
ENTRYPOINT [ "/bin/action" ]
113 changes: 57 additions & 56 deletions action.yml
Original file line number Diff line number Diff line change
@@ -1,83 +1,84 @@
name: goreadme
description: Updates readme from Go doc.
description: Github action for goreadme
inputs:
recursive:
description: Load docs recursively
badge-codecov:
default: false
description: Show CodeCov badge.
required: false
default: 'false'
functions:
description: Write functions section
badge-godoc:
default: false
description: Show GoDoc badge.
required: false
default: 'false'
skip-examples:
description: Skip the examples section
badge-golangci:
default: false
description: Show GolangCI badge.
required: false
default: 'false'
skip-sub-packages:
description: Skip the sub packages section
badge-goreportcard:
default: false
description: Show GoReportCard badge.
required: false
default: 'false'
badge-travisci:
description: Add Code Cov badge
required: false
default: 'false'
badge-codecov:
description: Add Code Cov badge
default: false
description: Show TravisCI badge.
required: false
default: 'false'
badge-golangci:
description: Add Golang CI badge
credit:
default: true
description: Add credit line to Goreadme.
required: false
default: 'false'
badge-godoc:
description: Add Go Doc badge
debug:
default: false
description: Print Goredme debug output
required: false
default: 'false'
badge-goreportcard:
description: Add Go report card badge
email:
default: [email protected]
description: Email for commit message
required: false
default: 'false'
credit:
description: Add credit line to Goreadme
functions:
default: false
description: Write functions section.
required: false
default: 'true'
readme-file:
description: Name of readme file.
github-token:
description: Github token for PR comments. Optional.
required: false
default: 'README.md'
import-path:
description: Override package import path.
required: false
commit-email:
description: Email for commit message.
readme-file:
default: README.md
description: Name of readme file
required: false
github-token:
description: Github Token for giving permissions to add readme diff comments.
recursive:
default: false
description: Load docs recursively.
required: false
debug:
description: Print Goredme debug output.
skip-examples:
default: false
description: Skip the examples section.
required: false
skip-sub-packages:
default: false
description: Skip the sub packages section.
required: false

runs:
using: docker
image: Dockerfile
env:
README_FILE: '${{ inputs.readme-file }}'
IMPORT_PATH: '${{ inputs.import-path }}'
GITHUB_TOKEN: '${{ inputs.github-token }}'
GOREADME_DEBUG: '${{ inputs.debug }}'
email: "${{ inputs.email }}"
github-token: "${{ inputs.github-token }}"
args:
- "-recursive=${{ inputs.recursive }}"
- "-functions=${{ inputs.functions }}"
- "-skip-examples=${{ inputs.skip-examples }}"
- "-skip-sub-packages=${{ inputs.skip-sub-packages }}"
- "-badge-travisci=${{ inputs.badge-travisci }}"
- "-badge-codecov=${{ inputs.badge-codecov }}"
- "-badge-golangci=${{ inputs.badge-golangci }}"
- "-badge-godoc=${{ inputs.badge-godoc }}"
- "-badge-goreportcard=${{ inputs.badge-goreportcard }}"
- "-credit=${{ inputs.credit }}"

- "-badge-codecov=${{ inputs.badge-codecov }}"
- "-badge-godoc=${{ inputs.badge-godoc }}"
- "-badge-golangci=${{ inputs.badge-golangci }}"
- "-badge-goreportcard=${{ inputs.badge-goreportcard }}"
- "-badge-travisci=${{ inputs.badge-travisci }}"
- "-credit=${{ inputs.credit }}"
- "-debug=${{ inputs.debug }}"
- "-functions=${{ inputs.functions }}"
- "-import-path=${{ inputs.import-path }}"
- "-readme-file=${{ inputs.readme-file }}"
- "-recursive=${{ inputs.recursive }}"
- "-skip-examples=${{ inputs.skip-examples }}"
- "-skip-sub-packages=${{ inputs.skip-sub-packages }}"
branding:
icon: book-open
color: blue

0 comments on commit 07fe9c5

Please sign in to comment.