-
Notifications
You must be signed in to change notification settings - Fork 74
105 lines (88 loc) · 3.09 KB
/
bot-bot.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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
name: bot-bot
on:
workflow_dispatch: null
schedule:
- cron: '*/15 * * * *'
concurrency: bot
jobs:
bot:
name: bot
runs-on: "ubuntu-latest"
defaults:
run:
shell: bash -l {0}
steps:
- uses: actions/checkout@v3
with:
path: cf-scripts
- name: check filesystem
run: |
df
- name: check memory
run: |
free
- uses: conda-incubator/setup-miniconda@v3
with:
miniforge-version: latest
environment-file: cf-scripts/environment.yml
python-version: "${{ vars.PYVER }}"
activate-environment: cf-scripts
condarc-file: cf-scripts/autotick-bot/condarc
- name: do local setup and stop me if needed
run: |
cd cf-scripts
python autotick-bot/stop_me_if_needed.py
- name: install bot code
if: success() && ! env.CI_SKIP
run: |
source cf-scripts/autotick-bot/install_bot_code.sh
env:
PASSWORD: ${{ secrets.AUTOTICK_BOT_TOKEN }}
- name: run migrations
if: success() && ! env.CI_SKIP
timeout-minutes: 210
run: |
export START_TIME=$(date +%s)
export TIMEOUT=7200
export CIRCLE_BUILD_URL="https://github.com/regro/cf-scripts/actions/runs/${RUN_ID}"
export CIRCLE_BUILD_NUM="actually-actions-${RUN_ID}"
pushd cf-graph
conda-forge-tick auto-tick
env:
USERNAME: regro-cf-autotick-bot
PASSWORD: ${{ secrets.AUTOTICK_BOT_TOKEN }}
RUN_ID: ${{ github.run_id }}
MEMORY_LIMIT_GB: 7
CF_TICK_GRAPH_DATA_BACKENDS: "mongodb:file"
MONGODB_CONNECTION_STRING: ${{ secrets.MONGODB_CONNECTION_STRING }}
- name: status of changes
if: github.ref == 'refs/heads/master' && always() && ! env.CI_SKIP
run: |
pushd cf-graph
git status
- name: deploy
if: github.ref == 'refs/heads/master' && always() && ! env.CI_SKIP
run: |
pushd cf-graph
export CIRCLE_BUILD_URL="https://github.com/regro/cf-scripts/actions/runs/${RUN_ID}"
export CIRCLE_BUILD_NUM="actually-actions-${RUN_ID}"
conda-forge-tick deploy-to-github
env:
PASSWORD: ${{ secrets.AUTOTICK_BOT_TOKEN }}
RUN_ID: ${{ github.run_id }}
- name: trigger next job
uses: benc-uk/workflow-dispatch@798e70c97009500150087d30d9f11c5444830385
if: github.ref == 'refs/heads/master' && ! cancelled() && ! failure() && ! env.CI_SKIP
with:
workflow: bot-bot
ref: ${{ github.event.ref }}
token: ${{ secrets.AUTOTICK_BOT_TOKEN }}
- name: bump on fail
if: github.ref == 'refs/heads/master' && failure() && ! env.CI_SKIP
run: |
export ACTION_URL="https://github.com/regro/cf-scripts/actions/runs/${RUN_ID}"
python cf-scripts/autotick-bot/bump_bot_team.py
env:
PASSWORD: ${{ secrets.AUTOTICK_BOT_TOKEN }}
RUN_ID: ${{ github.run_id }}
ACTION_NAME: ${{ github.workflow }}