-
Notifications
You must be signed in to change notification settings - Fork 0
64 lines (51 loc) · 1.98 KB
/
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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
name: Update
run-name: Update deps list
on:
workflow_dispatch:
concurrency:
group: ${{ github.ref }}-${{ github.workflow }}
cancel-in-progress: true
env:
GITHUB_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
permissions:
contents: write
pull-requests: write
jobs:
Get-latest-dependent-data:
name: Get latest dependent data
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4.1.6
- name: Setup Node.js
uses: actions/setup-node@v4.0.2
with:
cache: npm
check-latest: true
node-version-file: .nvmrc
- name: Install dependencies
run: npm ci
- name: Set up Python
uses: actions/setup-python@v5
#- name: Install github-dependents-info
# run: pip install -U github-dependents-info
# Getting the data this way is pretty gunky, especially as github-dependents-info
# has a github action. However the way we're using gdi isn't really how it's
# intended to be used. We're using it to gather and analyse info where as
# gdi was built as a documentation tool. This is especially true of the
# github action which doesn't give us the option to output this data as
# something like json which we can programmatically interogate.
#- name: Pipe our deps to a json file
# run: github-dependents-info --repo alphagov/govuk-frontend --sort stars --json > ./data/raw-deps.json
- name: Build filtered data
run: npm run build-filtered-data
- name: Create pull request
uses: peter-evans/create-pull-request@v6
with:
token: ${{ secrets.GITHUB_TOKEN }}
branch: update-filtered-data-${{ github.ref_name }}
delete-branch: true
commit-message: "Get latest filtered dependents data and rejections"
title: "Get latest filtered dependents data and rejections"
body: "Generated automatically by github action"
base: ${{ github.head_ref }}