Skip to content

Commit

Permalink
chore: bump Github Actions versions (were using old Node.js versions) (
Browse files Browse the repository at this point in the history
…#122)

* chore: bump Github Actions versions (were using old Node.js versions)

* chore: fixup lint errors

* chore: lint

---------

Co-authored-by: Joe Davidson <[email protected]>
  • Loading branch information
a-h and joerdav authored Aug 30, 2024
1 parent 960ff9f commit b3eb0e1
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 12 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,12 @@ jobs:
steps:
-
name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v4
with:
fetch-depth: 0
-
name: Set up Go
uses: actions/setup-go@v2
uses: actions/setup-go@v5
with:
go-version: 1.22

Expand Down Expand Up @@ -50,12 +50,12 @@ jobs:
steps:
-
name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v4
with:
fetch-depth: 0
-
name: Install NIX
uses: cachix/install-nix-action@v18
uses: cachix/install-nix-action@v25
with:
nix_path: nixpkgs=channel:nixos-unstable
- name: Update Flake
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-go@v2
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: "1.22"
- name: Run Unit tests
Expand All @@ -23,9 +23,9 @@ jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-go@v3
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: 1.22
- name: golangci-lint
uses: golangci/golangci-lint-action@v3
uses: golangci/golangci-lint-action@v6
4 changes: 2 additions & 2 deletions .golangci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,14 @@ linters:
- dogsled
- dupl
- errcheck
- exportloopref
- copyloopvar
- gochecknoinits
- goconst
- gocritic
- gocyclo
- gofmt
- goimports
- gomnd
- mnd
- goprintffuncname
- gosec
- gosimple
Expand Down
3 changes: 3 additions & 0 deletions run/interpreter.go
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,9 @@ func (i interpreter) executeShell(
if err != nil {
return fmt.Errorf("failed to parse task: %w", err)
}
// Ignore G115: Potential integer overflow when converting between integer types
// "Fd()" ultimately returns a SysFd value, which is an int.
//nolint:gosec
if os.Getenv("NO_COLOR") != "1" && term.IsTerminal(int(os.Stdout.Fd())) {
env = append(env, "CLICOLOR_FORCE=1", "FORCE_COLOR=1")
}
Expand Down
2 changes: 1 addition & 1 deletion run/run.go
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ func getInputs(task models.Task, inputs, env []string) ([]string, error) {
if environmentContainsInput(env, n) {
continue
}
return nil, fmt.Errorf(taskUsage(task))
return nil, errors.New(taskUsage(task))
}
return result, nil
}
Expand Down

0 comments on commit b3eb0e1

Please sign in to comment.