-
Notifications
You must be signed in to change notification settings - Fork 176
37 lines (33 loc) · 1.12 KB
/
update-gh-sponsors.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
name: Update GitHub Sponsors List
on:
workflow_dispatch:
schedule:
- cron: '0 0 * * *'
jobs:
update_sponsors:
permissions: read-all
runs-on: ubuntu-latest
env:
GH_TOKEN: ${{ secrets.GH_SPONSORS_READ_TOKEN }}
steps:
- name: Check out code
with:
ssh-key: ${{ secrets.TARBALL_COMMIT_SSH_KEY }}
uses: actions/checkout@v2
- name: Setup Directories
run: |
mkdir zig
echo "$(pwd)/zig" >> $GITHUB_PATH
- name: Download Zig
working-directory: zig
run: |
wget -qO zig.tar.xf "$(cat ../data/releases.json | jq -r '.master."x86_64-linux".tarball')"
tar --strip-components=1 -xJf zig.tar.xf
- name: Update Sponsors List
run: zig run .github/workflows/update-gh-sponsors.zig > assets/github-sponsors.html
- name: Commit changes
run: |
git config user.email "ziggy@ziglang.org"
git config user.name "Ziggy"
git diff --quiet || (git add assets/github-sponsors.html && git commit -m "CI: update gh sponsor list")
git push