Giter VIP home page Giter VIP logo

go-github-actions's Issues

Actions should check event that triggered them

This actions work very nicely! The README should mention that they expect to be triggered on pull_request events. Maybe the code should also check for that and blow up if it's not the right event.

Could not resolve host: null

I have a single main.go in a folder go, but it fails with a curl error when fmt reports files:

go/main.go
curl: (6) Could not resolve host: null

### FAILED go fmt 23:29:39Z (15.78s)

main.workflow:

workflow "Go linter" {
  on = "push"
  resolves = ["go fmt"]
}

action "go fmt" {
  uses = "sjkaliski/go-github-actions/[email protected]"
  secrets = ["GITHUB_TOKEN"]
  env = {
    GO_WORKING_DIR = "."
  }
}

Any idea what could be wrong? I also tried without the env variable and with v0.2.0

Go fmt passes on compile error

When there is a compile error, go fmt passes:

// main.go
import (
  "log"
)

func main
./main.go:1:1: expected 'package', found 'func'

### SUCCEEDED go fmt 23:38:46Z (10.566s)

It would be great if this would exit as non-succesful.

support for multiple versions of go

Currently this project defaults to the latest stable version of Go, 1.11.x, via the golang:1.11 docker image.

A couple questions come up:

  1. How do we handle Go updates in this package?
  2. Do we need to provide backwards support for 1.9.x, 1.10.x?

For 1, seems like a good option is to update once the new minor version is out and stable & then publish a new release. Any new updates moving forward would only support the latest Go version.

For 2, not sure just yet. Thoughts?

action: golint

Add support for golint. E.g.

action "go-lint" {
  uses    = "sjkaliski/go-github-actions/[email protected]"
  needs   = "previous-action"
  secrets = ["GITHUB_TOKEN"]

  env {
    GO_WORKING_DIR = "./path/to/go/files"
  }
}

Ability to ignore specific (e.g. vendor) directories.

A lot of projects will commit their vendored dependencies, or resolve them in CI. A lot of the time, this vendored code is not properly formatted/vetted/etc.

The ability to ignore directories like these might be useful for a broader audience. Usage could potentially look like this:

action "gofmt" {
  uses = "sjkaliski/go-github-actions/fmt@..."
  ...

  env {
    GO_IGNORE_DIRS = "vendor,internal,some/other/pkg"
  }
}

Cheers!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.