Skip to content

Commit 3e43eae

Browse files
authored
Create gsg-repo-gen.yml
An action that runs daily to generate the list of repos that contain getting started guines
1 parent 28e30e5 commit 3e43eae

File tree

1 file changed

+41
-0
lines changed

1 file changed

+41
-0
lines changed

.github/workflows/gsg-repo-gen.yml

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
name: List of repos that contain SparkFun Getting Started Guines
2+
on:
3+
push:
4+
branches:
5+
- "main"
6+
schedule:
7+
# Daily at 8:20 UTC
8+
- cron: '20 8 * * *'
9+
10+
env:
11+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
12+
13+
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
14+
jobs:
15+
# This workflow contains a single job called "build"
16+
build-gsg-repos:
17+
# The type of runner that the job will run on
18+
runs-on: ubuntu-latest
19+
20+
permissions:
21+
contents: write
22+
23+
# Steps represent a sequence of tasks that will be executed as part of the job
24+
steps:
25+
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
26+
- uses: actions/checkout@v3
27+
28+
# Run our gh command to find repos - only finds public repos with the given tag
29+
- name: gh command
30+
run: |
31+
gh search repos topic:sparkfun-getting-started --owner sparkfun --json name,url,homepage,description >> gsg.json
32+
33+
- name: commit updates
34+
run: |
35+
git config --global user.name 'SparkFun Automated Action'
36+
git config --global user.email 'your-username@users.noreply.github.com'
37+
git add gsg.json
38+
git commit -am "daily update"
39+
git push
40+
41+

0 commit comments

Comments
 (0)