-
Notifications
You must be signed in to change notification settings - Fork 3
49 lines (42 loc) · 1.78 KB
/
licenses-update.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
name: Licenses Update
on:
workflow_dispatch:
schedule:
- cron: '0 0 * * MON'
jobs:
update:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-ruby@v1
with: { ruby-version: '2.6' }
- uses: actions/setup-go@v2
with: { go-version: '1.16' }
# set up correct version of node
- id: nvmrc
run: echo ::set-output name=NODE_VERSION::$(cat .nvmrc)
- uses: actions/setup-node@v2
with: { node-version: '${{ steps.nvmrc.outputs.NODE_VERSION }}' }
- name: Install license_finder
run: gem install license_finder:6.9.0 # sync with licenses-check.yml
- name: Generate report
run: ./dev/licenses.sh
- name: Preview report diff
run: git --no-pager diff
- name: Open pull request
uses: peter-evans/create-pull-request@v3
with:
labels: automerge
base: main
branch: chore/licenses-update
title: 'chore: update third-party licenses'
commit-message: 'chore: update third-party licenses'
body: |
This is an automated pull request generated by [this run](https://github.com/sourcegraph/sourcegraph/actions/runs/${{ github.run_id }}).
Learn more about our GitHub Actions for managing licenses [here](https://docs.sourcegraph.com/dev/background-information/continuous_integration#third-party-licenses).
You're safe to merge this pull request when the required checks are passing.
# token must be a personal access token for pull request to trigger other actions
# token must have `repo` scope
# currently @sourcegraph-bot cross-repo-github-actions in 1password
# configure in https://github.com/sourcegraph/sourcegraph/settings/secrets/GH_REPO_TOKEN
token: ${{ secrets.GH_REPO_TOKEN }}