-
Notifications
You must be signed in to change notification settings - Fork 1
44 lines (42 loc) · 1.25 KB
/
main.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
name: Track
# Controls when the workflow will run
on:
push:
branches:
- deploy
workflow_dispatch:
schedule:
- cron: '*/30 * * * *' # every 30min
jobs:
arweave-tracking:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
ref: deploy
- uses: actions/setup-python@v3
- run: pip install -r requirements.txt
- run: python . start_tracking --keep_tracking --keep_recent_count 2000
- name: Check Git Status
id: status
run: '[[ -z $(git status -s) ]] || echo "::set-output name=status::changed"'
- name: Commit && Push
if: steps.status.outputs.status == 'changed'
run: |
git config --global user.name 'Arweave Tracker'
git config --global user.email 'crysheen+arweave-tracker@gmail.com'
git add .
git commit -am "Update data"
git push origin deploy
- name: Release feeds
uses: softprops/action-gh-release@v1
with:
tag_name: latest
draft: false
files: "${{ env.FEED_FILES }}"
- name: Release metrics
uses: softprops/action-gh-release@v1
with:
tag_name: latest
draft: false
files: "${{ env.METRIC_FILES }}"