Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updated workflows & dependabot #4

Merged
merged 1 commit into from
Oct 7, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 2 additions & 6 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,9 @@ updates:
- package-ecosystem: "gomod"
directory: "/"
schedule:
interval: "daily"
reviewers:
- "Fank"
interval: "weekly"

- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "daily"
reviewers:
- "Fank"
interval: "weekly"
5 changes: 5 additions & 0 deletions .github/templates/go-licenses.md.tpl
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
## [go-licenses](https://github.com/google/go-licenses) report

{{- range . }}
- {{ .Name }} ({{ .Version }}) [{{ .LicenseName }}]({{ .LicenseURL }})
{{- end }}
34 changes: 2 additions & 32 deletions .github/workflows/go.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ on:
push:
branches:
- main
- master
pull_request:

permissions:
Expand All @@ -13,7 +12,7 @@ permissions:

jobs:
golangci:
name: lint
name: Go Lint
runs-on: ubuntu-latest
steps:
- name: Checkout repository
Expand All @@ -34,11 +33,10 @@ jobs:

- name: golangci-lint
uses: golangci/golangci-lint-action@v6
with:
version: latest

test:
runs-on: ubuntu-latest
name: Go Test
steps:
- name: Checkout repository
uses: actions/checkout@v4
Expand All @@ -63,31 +61,3 @@ jobs:
uses: robherley/go-test-action@v0
with:
testArguments: ./...

license-check:
runs-on: ubuntu-latest
name: License Check
steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Set up Go
uses: actions/setup-go@v5
with:
go-version-file: ./go.mod

- name: Install go-licenses
run: go install github.com/google/go-licenses@latest
shell: bash

- name: Check licenses
run: >
go-licenses check ./...
--ignore ${{ github.repository }}
shell: bash

- name: Get licenses list
run: >
go-licenses csv ./...
--ignore ${{ github.repository }}
shell: bash
48 changes: 48 additions & 0 deletions .github/workflows/license_go.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
name: License Go

on:
push:
branches:
- main
pull_request:

jobs:
license-check:
runs-on: ubuntu-latest
name: License Check
steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Set up Go
uses: actions/setup-go@v5
with:
go-version-file: ./go.mod

- name: Install go-licenses
run: go install github.com/google/go-licenses@latest

- name: Check licenses
run: go-licenses check ./...

license-report:
runs-on: ubuntu-latest
name: License Report
steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Set up Go
uses: actions/setup-go@v5
with:
go-version-file: ./go.mod

- name: Install go-licenses
run: go install github.com/google/go-licenses@latest

- name: Report to GitHub Step Summary
run: >
go-licenses report ./...
--template .github/templates/go-licenses.md.tpl
>> $GITHUB_STEP_SUMMARY
shell: bash