Skip to content

Commit

Permalink
fix: add action.yml
Browse files Browse the repository at this point in the history
This file is required in order to publish to the marketplace.

Signed-off-by: Andrew Rynhard <[email protected]>
  • Loading branch information
andrewrynhard committed Dec 8, 2019
1 parent d9668e0 commit 4eb4beb
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 9 deletions.
5 changes: 5 additions & 0 deletions .drone.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,11 @@ services:
path: /var/run

steps:
- name: git-fetch-tags
image: docker:git
commands:
- git fetch --tags

- name: build
image: autonomy/build-container:latest
pull: always
Expand Down
6 changes: 0 additions & 6 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -36,12 +36,6 @@ FROM alpine:3.9 as ca-certificates
RUN apk add --update --no-cache ca-certificates

FROM scratch AS image
LABEL "com.github.actions.name"="Conform Action"
LABEL "com.github.actions.description"="Policy enforcement for your pipelines."
LABEL "com.github.actions.icon"="check-circle"
LABEL "com.github.actions.color"="black"
LABEL "repository"="https://github.com/talos-systems/conform.git"
LABEL "maintainer"="Andrew Rynhard <[email protected]>"
COPY --from=ca-certificates /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/
COPY --from=build /conform-linux-amd64 /conform
ENTRYPOINT [ "/conform" ]
Expand Down
12 changes: 12 additions & 0 deletions action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
name: "Conform Action"
description: "Policy enforcement for your pipelines."
branding:
icon: "check-circle"
color: "gray-dark"
inputs:
token:
description: "The GitHub token. Must have repo:status access. Can be specified by using {{ secrets.GITHUB_TOKEN }}"
required: true
runs:
using: "docker"
image: "docker://autonomy/conform:v0.1.0-alpha.17"
2 changes: 1 addition & 1 deletion cmd/serve.go
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ var serveCmd = &cobra.Command{
cmd.Stdout = os.Stdout
cmd.Stderr = os.Stdout
cmd.Dir = cloneRepo
cmd.Env = []string{fmt.Sprintf("GITHUB_TOKEN=%s", os.Getenv("GITHUB_TOKEN")), fmt.Sprintf("GITHUB_EVENT_PATH=%s", event)}
cmd.Env = []string{fmt.Sprintf("INPUT_TOKEN=%s", os.Getenv("INPUT_TOKEN")), fmt.Sprintf("GITHUB_EVENT_PATH=%s", event)}
err = cmd.Start()
if err != nil {
log.Printf("failed to start command: %+v\n", err)
Expand Down
4 changes: 2 additions & 2 deletions internal/summarizer/summarizer.go
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,9 @@ func (n *Noop) SetStatus(state, policy, check, message string) error {
// NewGitHubSummarizer returns a summarizer that posts policy checks as
// status checks on a pull request.
func NewGitHubSummarizer() (*GitHub, error) {
token, ok := os.LookupEnv("GITHUB_TOKEN")
token, ok := os.LookupEnv("INPUT_TOKEN")
if !ok {
return nil, errors.New("missing GITHUB_TOKEN")
return nil, errors.New("missing INPUT_TOKEN")
}
eventPath, ok := os.LookupEnv("GITHUB_EVENT_PATH")
if !ok {
Expand Down

0 comments on commit 4eb4beb

Please sign in to comment.