aboutsummaryrefslogtreecommitdiffhomepage
path: root/.github/workflows/update-oss-attribution.yml
blob: 38679fe60ae8b52f4c85e9f01dc06705a5bcf3f6 (plain)
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
name: update oss attributions
on:
  push:
    branches:
      - master
    paths:
      - 'package.json'
      - 'package-lock.json'
  workflow_dispatch:

jobs:
  update-oss:
    runs-on: ubuntu-latest 
    steps:
      - uses: actions/checkout@v4
        with:
          submodules: recursive
      - uses: actions/setup-node@v4
        with:
          node-version: '18'
      - name: Install and generate attribution
        run: |
          npm ci
          npm i -g oss-attribution-generator
          generate-attribution
          mv ./oss-attribution/attribution.txt ./public/oss-attribution/attribution.txt
      - name: Prettify attributions
        run: |
          cd ci && npx ts-node prettify.ts

      - name: Create pull request to update list
        uses: peter-evans/create-pull-request@v7
        # v4.2.3
        with:
          commit-message: Update OSS Attribution
          author: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
          branch: ci/oss_attribution
          title: Update OSS Attribution
          body: Automated OSS Attribution update