File tree 8 files changed +32
-18
lines changed
8 files changed +32
-18
lines changed Original file line number Diff line number Diff line change 1
1
#! /usr/bin/env bash
2
2
set -eu
3
3
4
+ # reads repository JSON text from stdin
4
5
# remove archived repositories, and the reference to this repository
6
+ # print resulting JSON text to stdout
5
7
6
8
cat | jq ' [.[] | select(.archived==false) | select(.name!="cal-itp.github.io")]'
Original file line number Diff line number Diff line change
1
+ #! /usr/bin/env bash
2
+ set -eu
3
+
4
+ # print public Cal-ITP source repositories as JSON text to stdout
5
+ # see https://docs.github.com/en/rest/reference/repos#list-organization-repositories
6
+
7
+ curl -H " Accept: application/vnd.github.v3+json" https://api.github.com/orgs/cal-itp/repos? type=source
Original file line number Diff line number Diff line change
1
+ #! /usr/bin/env bash
2
+ set -eu
3
+
4
+ # run the repository data pipeline: get > filter > sort > output
5
+
6
+ source=.github/bin/repos
7
+ target=_data/repos.json
8
+
9
+ $source /get.sh | $source /filter.sh | $source /sort.sh > " $target "
10
+
11
+ # save resulting file name in GitHub Actions context
12
+ # see https://docs.github.com/en/actions/reference/workflow-commands-for-github-actions#setting-an-output-parameter
13
+
14
+ echo " ::set-output name=data_file::$target "
Original file line number Diff line number Diff line change
1
+ #! /usr/bin/env bash
2
+ set -eu
3
+
4
+ # reads repository JSON text from stdin
5
+ # sort by lowercase name
6
+ # print resulting JSON text to stdout
7
+
8
+ cat | jq " sort_by(.name | ascii_downcase)"
Original file line number Diff line number Diff line change 20
20
21
21
- name : Update local repository data
22
22
id : pipeline
23
- run : ./bin/pipeline.sh repos
23
+ run : ./.github/ bin/repos/ pipeline.sh
24
24
25
25
- name : Commit updated data
26
26
id : commit
Load Diff This file was deleted.
Load Diff This file was deleted.
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments