-
Notifications
You must be signed in to change notification settings - Fork 273
53 lines (43 loc) · 1.44 KB
/
publish-events.yml
File metadata and controls
53 lines (43 loc) · 1.44 KB
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
name: Daily Event Publishing
on:
schedule:
- cron: '0 0 * * *'
workflow_dispatch:
permissions:
contents: write
jobs:
published-daily-events:
runs-on: ubuntu-latest
steps:
- uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: '8'
- name: Set up Clojure
uses: DeLaGuardo/setup-clojure@11.0
with:
cli: 'latest'
- name: Install CLI
run: |
curl -L -O https://github.com/clojure/brew-install/releases/latest/download/posix-install.sh
chmod +x posix-install.sh
sudo ./posix-install.sh
clojure
- name: Check out the repository
uses: actions/checkout@v4
- name: Run Event Script
run: |
cd script/eventgen
clojure -X parse/parse-feed :dir '"../../content/events"'
cd ../..
- name: Commit and push event page
run: |
git config --global user.name clojure-build
git config --global user.email "clojure-build@users.noreply.github.com"
git add content/events
if ! git diff --quiet --cached
then
git commit -m 'update events'
git push
curl -X POST -H "Authorization:token ${{ secrets.GH_TOKEN }}" -H "Accept:application/vnd.github.v3+json" --data '{"event_type":"publish"}' https://api.github.com/repos/clojure/clojure-org-style/dispatches
fi