-
-
Notifications
You must be signed in to change notification settings - Fork 28
54 lines (50 loc) · 1.45 KB
/
publish_to_pages.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
name: Publish Pages
on:
schedule:
- cron: "30 * * * *"
workflow_dispatch:
push:
jobs:
sponsor_count_json:
runs-on: ubuntu-latest
steps:
- uses: actions/github-script@v7
with:
script: |
const fs = require("fs")
const query = `query {
user(login:"${context.repo.owner}") {
... on Sponsorable {
sponsors(first: 10) {
totalCount
}
}
}
}`;
const variables = {}
const result = await github.graphql(query, variables)
console.log(result)
fs.writeFile('./sponsor_count.json', JSON.stringify(result.user), err => {
if (err) {
console.error(err);
} else {
// file written successfully
}
});
- uses: actions/upload-artifact@v4
with:
name: sponsor-count
path: ./sponsor_count.json
merged_platform_zips:
runs-on: ubuntu-latest
steps:
- uses: actions/github-script@v7
with:
script: |
const url = "https://raw.githubusercontent.com/mattpannella/pocket-updater-utility/main/image_packs.json"
const packs = await github.request(url)
console.log(packs)
- uses: actions/upload-artifact@v4
with:
name: image-packs
path: ./image_packs