-
Notifications
You must be signed in to change notification settings - Fork 12
36 lines (35 loc) · 1.28 KB
/
bitcoinops.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
name: Bitcoin Optech
on:
schedule:
- cron: '0 13 * * 3' # every Wednesday at 1pm UTC
workflow_dispatch:
repository_dispatch:
jobs:
fetch:
if: (github.event.action == 'scrape' && github.event.client_payload.repository == 'aureleoules/test') || github.event_name == 'schedule' || github.event_name == 'workflow_dispatch'
runs-on: ubuntu-latest
steps:
- name: Check password
if: github.event_name == 'scrape'
run: if [ "${{ github.event.client_payload.secret }}" != "${{ secrets.COMMON_SECRET }}" ]; then echo "Wrong password"; exit 1; fi
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
python-version: 3.9
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
- name: Fetch data
run: |
mkdir /tmp/data
python bitcoinops/main.py
env:
ES_ENGINE: ${{ secrets.ES_ENGINE }}
ES_URL: ${{ secrets.ES_URL }}
ES_TOKEN: ${{ secrets.ES_TOKEN }}
DATA_DIR: /tmp/data
CLOUD_ID: ${{ secrets.CLOUD_ID }}
USER_PASSWORD: ${{ secrets.USER_PASSWORD }}
USERNAME: ${{ secrets.USERNAME }}
INDEX: ${{ secrets.INDEX }}