Skip to content

Commit cda0d5c

Browse files
committed
Setup github action with github-dependents-info
1 parent 41ff354 commit cda0d5c

File tree

1 file changed

+47
-0
lines changed

1 file changed

+47
-0
lines changed

.github/workflows/update.yml

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
name: Update
2+
run-name: Update deps list
3+
on:
4+
workflow_dispatch:
5+
push:
6+
7+
concurrency:
8+
group: ${{ github.ref }}-${{ github.workflow }}
9+
cancel-in-progress: true
10+
11+
jobs:
12+
Get-latest-dependent-data:
13+
name: Get latest dependent data
14+
runs-on: ubuntu-latest
15+
16+
steps:
17+
- name: Checkout code
18+
uses: actions/[email protected]
19+
20+
- name: Setup Node.js
21+
uses: actions/[email protected]
22+
23+
with:
24+
cache: npm
25+
check-latest: true
26+
node-version-file: .nvmrc
27+
28+
- name: Install dependencies
29+
run: npm ci
30+
31+
- name: Set up Python
32+
uses: actions/setup-python@v5
33+
34+
- name: Install github-dependents-info
35+
run: pip install -U github-dependents-info
36+
37+
# Getting the data this way is pretty gunky, especially as github-dependents-info
38+
# has a github action. However the way we're using gdi isn't really how it's
39+
# intended to be used. We're using it to gather and analyse info where as
40+
# gdi was built as a documentation tool. This is especially true of the
41+
# github action which doesn't give us the option to output this data as
42+
# something like json which we can programmatically interogate.
43+
- name: Pipe our deps to a json file
44+
run: github-dependents-info --repo alphagov/govuk-frontend --sort stars --json > raw-deps.json
45+
46+
- name: testing testing
47+
run: cat raw-deps.json

0 commit comments

Comments
 (0)