Skip to content

Commit

Permalink
some workflow fises
Browse files Browse the repository at this point in the history
  • Loading branch information
Reuven committed Jan 20, 2024
1 parent 221400f commit ed2f945
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 30 deletions.
4 changes: 4 additions & 0 deletions .github/workflows/go.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@ name: go
on:
pull_request:
push:

permissions:
contents: read

jobs:
build-and-test:
env:
Expand Down
34 changes: 19 additions & 15 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,24 +5,18 @@ on:

permissions:
contents: read
# Optional: allow read access to pull request. Use with `only-new-issues` option.
# pull-requests: read

jobs:
golangci:
strategy:
matrix:
go: ['1.21']
os: [ubuntu-latest, macos-latest] # exclude windows because it fails with timeout
name: ${{ matrix.go }} on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
name: lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-go@v4
with:
go-version: ${{ matrix.go }}
go-version: '1.21'
cache: false
- name: golangci-lint
- name: Run golangci-lint
uses: golangci/golangci-lint-action@v3
with:
# Require: The version of golangci-lint to use.
Expand All @@ -34,13 +28,23 @@ jobs:
# working-directory: somedir

# Optional: golangci-lint command line arguments.
#
# Note: by default the `.golangci.yml` file should be at the root of the repository.
#
# Note: By default, the `.golangci.yml` file should be at the root of the repository.
# The location of the configuration file can be changed by using `--config=`
# args: --timeout=30m --config=/my/path/.golangci.yml --issues-exit-code=0
# args: --timeout=30m --config=/my/path/.golangci.yml --issues-exit-code=0

# Optional: show only new issues if it's a pull request. The default value is `false`.
# only-new-issues: true

# Optional:The mode to install golangci-lint. It can be 'binary' or 'goinstall'.
# install-mode: "goinstall"
# Optional: if set to true, then all caching functionality will be completely disabled,
# takes precedence over all other caching options.
# skip-cache: true

# Optional: if set to true, then the action won't cache or restore ~/go/pkg.
# skip-pkg-cache: true

# Optional: if set to true, then the action won't cache or restore ~/.cache/go-build.
# skip-build-cache: true

# Optional: The mode to install golangci-lint. It can be 'binary' or 'goinstall'.
# install-mode: "goinstall"
21 changes: 6 additions & 15 deletions .github/workflows/vuln.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,18 +9,9 @@ permissions:
# pull-requests: read

jobs:
golangci:
strategy:
matrix:
go: ['1.21']
os: [ubuntu-latest, macos-latest, windows-latest]
name: ${{ matrix.go }} on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
- uses: actions/setup-go@v4
with:
go-version: ${{ matrix.go }}
cache: false
- id: govulncheck
uses: golang/govulncheck-action@v1
govulncheck_job:
runs-on: ubuntu-latest
name: Run govulncheck
steps:
- id: govulncheck
uses: golang/govulncheck-action@v1

0 comments on commit ed2f945

Please sign in to comment.