-
Notifications
You must be signed in to change notification settings - Fork 0
49 lines (48 loc) · 1.69 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
49
name: 🔁 update
on:
schedule:
- cron: '0 12 * * *'
push:
paths:
- '.github/workflows/update.yml'
workflow_dispatch:
jobs:
update:
name: update
runs-on: macOS-latest
steps:
- name: ⬇️ Checkout
uses: actions/checkout@master
with:
fetch-depth: 1
- name: 🌊 Install gallery-workflow
run: |
rm -f .build/release/gallery-workflow
curl -L https://github.com/$GITHUB_REPOSITORY-workflow/releases/latest/download/gallery-workflow.zip --output gallery-workflow.zip
unzip gallery-workflow.zip
rm gallery-workflow.zip
if [ -f .build/release/gallery-workflow ]; then
echo "gallery-workflow installed"
.build/release/gallery-workflow --version
else
echo "gallery-workflow cannot be downloaded using url https://github.com/$GITHUB_REPOSITORY-workflow/releases/latest/download/gallery-workflow.zip"
exit 1
fi
- name: 🏷 Update releases
run: |
.build/release/gallery-workflow --github-token "${{ secrets.PUBLISH_TOKEN }}"
- name: 🥙 Aggregate by topics
run: |
.build/release/gallery-workflow aggregate
- name: 🧹 Format
run: |
brew install yq
./.github/outputpretty.sh
- name: ⬆️ Push
run: |
rm -f .build/release/gallery-workflow
git add .
git config --local user.email "eric.marchand@4d.com"
git config --local user.name "mesopelagique"
git diff --quiet && git diff --staged --quiet || git commit -a -m "🔄 Update"
./.github/push.sh "main" "${{ secrets.PUBLISH_TOKEN }}"