-
Notifications
You must be signed in to change notification settings - Fork 7
51 lines (48 loc) · 1.31 KB
/
weekly.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
---
name: Weekly clean & rebuild
on:
schedule:
- cron: '0 8 * * 6'
workflow_dispatch:
concurrency:
group: run-only-one-workflow
jobs:
build:
uses: ./.github/workflows/build.yml
with:
cacheless: true
kas-path: meta-dts/kas.yml
deploy-cache:
name: Deploy cache on cache.dasharo.com
needs: build
runs-on:
labels: dts-builder
steps:
- name: Prepare SSH key
shell: bash
env:
SSH_KEY: ${{secrets.SSH_KEY}}
run: |
echo -e ${SSH_KEY} > ~/.ssh/dts-ci-key
chmod 600 ~/.ssh/dts-ci-key
- name: Send sstate-cache folder to cache.dasharo.com
shell: bash
run: |
ssh -i ~/.ssh/dts-ci-key builder@10.1.40.2 "mkdir -p cache/yocto/dts"
rsync -P -e "ssh -i ~/.ssh/dts-ci-key" -rlptD --delete build/sstate-cache builder@10.1.40.2:cache/yocto/dts
- name: Send downloads folder to cache.dasharo.com
shell: bash
run: |
rsync -P -e "ssh -i ~/.ssh/dts-ci-key" -rlptD --delete build/downloads builder@10.1.40.2:cache/yocto/dts
cleanup:
name: Cleanup
if: always()
needs: deploy-cache
runs-on:
labels: dts-builder
steps:
- name: Cleanup after deployment
shell: bash
run: |
rm -rf ~/.ssh/dts-ci-key
rm -rf build