Skip to content

Commit

Permalink
Updated workflows & dependabot (#4)
Browse files Browse the repository at this point in the history
  • Loading branch information
Fank authored Oct 7, 2024
1 parent 08d506d commit 3773e07
Show file tree
Hide file tree
Showing 4 changed files with 57 additions and 38 deletions.
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

0 comments on commit 3773e07

Please sign in to comment.