-
Notifications
You must be signed in to change notification settings - Fork 0
48 lines (46 loc) · 1.58 KB
/
update.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
name: update
on:
schedule:
- cron: '0 * * * *'
jobs:
update:
name: update
runs-on: macOS-latest
steps:
- name: ⬇️ Checkout
uses: actions/checkout@master
with:
fetch-depth: 1
- name: 🔄 Update JSON
run: |
./topics.sh "${{ secrets.GITHUB_TOKEN }}"
- name: 🔒 Install ssl
run: |
brew install libressl
- name: 🌊 Install topic-workflow
run: |
curl -L https://github.com/$GITHUB_REPOSITORY/releases/latest/download/topic-workflow.zip --output topic-workflow.zip
unzip topic-workflow.zip
rm topic-workflow.zip
if [ -f .build/release/topic-workflow ]; then
echo "Release installed"
else
echo "No release, do a new build"
swift build -c release
fi
- name: 🏷 Flatten
run: |
echo "check new topics"
.build/release/topic-workflow --from "${{ secrets.FROM_EMAIL }}" --to "${{ secrets.NEW_EMAIL }}" --apiKey "{{secrets.API_KEY }}" --apiKey "{{secrets.DOMAIN }}"
./outputpretty.sh
- name: 📊Markdown
run: |
echo "generate markdown file"
.build/release/topic-workflow list --reporter "markdown" > list.md
- name: ⬆️ Push
run: |
git config --global user.email "action@github.com"
git config --global user.name "GitHub Action"
git add .
git diff --quiet && git diff --staged --quiet || git commit -a -m "🔄 Update"
./push.sh "master" "${{ secrets.GITHUB_TOKEN }}"