-
Notifications
You must be signed in to change notification settings - Fork 7
67 lines (65 loc) · 2.01 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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
---
name: Weekly clean & rebuild
on:
schedule:
- cron: '0 8 * * 6'
workflow_dispatch:
concurrency:
group: run-only-one-workflow
jobs:
build-uefi-sb:
uses: ./.github/workflows/build.yml
with:
cacheless: true
kas-path: meta-dts/kas-uefi-sb.yml
move-build-artifacts:
needs: build-uefi-sb
runs-on:
labels: dts-builder
steps:
- name: Move UEFI SB build artifacts
run: |
mv build build-sb
build:
needs: move-build-artifacts
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"
ssh -i ~/.ssh/dts-ci-key builder@10.1.40.2 "mkdir -p cache/yocto/dts/dts-uefi-sb"
rsync -P -e "ssh -i ~/.ssh/dts-ci-key" -rlptD --delete build/sstate-cache builder@10.1.40.2:cache/yocto/dts
rsync -P -e "ssh -i ~/.ssh/dts-ci-key" -rlptD --delete build-sb/sstate-cache builder@10.1.40.2:cache/yocto/dts/dts-uefi-sb
- 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
rsync -P -e "ssh -i ~/.ssh/dts-ci-key" -rlptD --delete build-sb/downloads builder@10.1.40.2:cache/yocto/dts/dts-uefi-sb
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 build-sb