diff --git a/.github/dependabot.yml b/.github/dependabot.yml index 2710e24..442087c 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -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" diff --git a/.github/templates/go-licenses.md.tpl b/.github/templates/go-licenses.md.tpl new file mode 100644 index 0000000..5ac0a47 --- /dev/null +++ b/.github/templates/go-licenses.md.tpl @@ -0,0 +1,5 @@ +## [go-licenses](https://github.com/google/go-licenses) report + +{{- range . }} +- {{ .Name }} ({{ .Version }}) [{{ .LicenseName }}]({{ .LicenseURL }}) +{{- end }} diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml index c6ad9e3..51ea43d 100644 --- a/.github/workflows/go.yml +++ b/.github/workflows/go.yml @@ -4,7 +4,6 @@ on: push: branches: - main - - master pull_request: permissions: @@ -13,7 +12,7 @@ permissions: jobs: golangci: - name: lint + name: Go Lint runs-on: ubuntu-latest steps: - name: Checkout repository @@ -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 @@ -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 diff --git a/.github/workflows/license_go.yml b/.github/workflows/license_go.yml new file mode 100644 index 0000000..e9c49a1 --- /dev/null +++ b/.github/workflows/license_go.yml @@ -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