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

license(oss): Added OSS license report automation #866

Merged
merged 1 commit into from
Jan 10, 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
19 changes: 19 additions & 0 deletions .github/licenses.tmpl
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
---
title: Open Source Licenses
sidebar_label: OSS Licenses
---

# Devpod dependencies

The following open source dependencies are used to build the [DevPod][] CLI.

[DevPod]: https://devpod.sh

## Go Packages

Some packages may only be included on certain architectures or operating systems.

{{ range . }}
- [{{.Name}}](https://pkg.go.dev/{{.Name}}) ([{{.LicenseName}}]({{.LicenseURL}}))
{{- end }}

47 changes: 47 additions & 0 deletions .github/workflows/go-licenses.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
name: go-licenses

on:
push:
branches:
- main
paths:
- .github/licenses.tmpl
- .github/workflows/go-licenses.yaml
- go.mod
workflow_dispatch:

concurrency:
group: ${{ github.workflow }}-$${{ github.head_ref || github.run_id }}
cancel-in-progress: true

jobs:
update-licenses:
runs-on: ubuntu-latest

steps:
- name: Check out code
uses: actions/checkout@v4

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

- name: Install go-licenses
run: |
go install github.com/google/[email protected]

- name: Run go-licenses
run: go-licenses report ./... > docs/pages/licenses/devpod.mdx --template .github/licenses.tmpl --ignore github.com/loft-sh

- name: Create pull request
uses: peter-evans/create-pull-request@v5
with:
token: ${{ secrets.GH_ACCESS_TOKEN }}
committer: Loft Bot <[email protected]>
branch: licenses/devpod
commit-message: "license(DevPod): Updated OSS licenses"
title: "license(DevPod): Updated OSS licenses"
body: Triggered by ${{ github.repository }}@${{ github.sha }}
signoff: true
delete-branch: true
Loading
Loading