Skip to content

Commit

Permalink
Merge pull request #22 from kumojin/xba-update-golanglint
Browse files Browse the repository at this point in the history
ci: use Renovate to update Golang lint
  • Loading branch information
xballoy authored May 14, 2024
2 parents b29d358 + 6fe047d commit 59f43a1
Show file tree
Hide file tree
Showing 5 changed files with 26 additions and 7 deletions.
15 changes: 11 additions & 4 deletions .github/workflows/golangci-lint.yml
Original file line number Diff line number Diff line change
@@ -1,28 +1,35 @@
name: golangci-lint

on:
push:
branches: [main]
pull_request:

permissions:
contents: read

env:
GOLANGCI_LINT_VERSION: "v1.58.1"

jobs:
golangci:
name: lint
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4

- name: Setup Go
- uses: actions/setup-go@cdcb36043654635271a94b9a6d1392de5bb323a7 # v5
uses: actions/setup-go@cdcb36043654635271a94b9a6d1392de5bb323a7 # v5
with:
go-version: '1.21'
cache: false

- name: Run vet
run: go vet ./...

- name: golangci-lint
uses: golangci/golangci-lint-action@a4f60bb28d35aeee14e6880718e0c85ff1882e64 # v6
with:
version: v3.7.0
version: ${{ env.GOLANGCI_LINT_VERSION }}
args: --timeout 3m --enable=gofmt --verbose
1 change: 0 additions & 1 deletion models/blob.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,4 +39,3 @@ func (brc BlobRepositoryConfiguration) Endpoint() string {
func (brc BlobRepositoryConfiguration) CDNEndpoint() string {
return fmt.Sprintf("https://%s.azureedge.net/", brc.AccountName)
}

13 changes: 13 additions & 0 deletions renovate.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,18 @@
":enableVulnerabilityAlertsWithLabel(security)",
":automergeMinor",
":automergeDigest"
],
"customManagers": [
{
"customType": "regex",
"fileMatch": [
"^.github/(?:workflows|actions)/.+\\.ya?ml$"
],
"matchStrings": [
"GOLANGCI_LINT_VERSION: \"(?<currentValue>.*?)\""
],
"depNameTemplate": "github.com/golangci/golangci-lint",
"datasourceTemplate": "go"
}
]
}
2 changes: 1 addition & 1 deletion repository/azure/blob_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -60,4 +60,4 @@ func getBlobRepository() defaultBlobRepository {
},
Bucket: "test-bucket",
}).(defaultBlobRepository)
}
}
2 changes: 1 addition & 1 deletion repository/repository.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@ import (
// BlobRepository is for interacting with blobs (files, images, etc.)
type BlobRepository interface {
Upload(metadata models.BlobMetadata, in io.Reader) (*models.UploadURL, error)
}
}

0 comments on commit 59f43a1

Please sign in to comment.