Skip to content

Weekly clean & rebuild #63

Weekly clean & rebuild

Weekly clean & rebuild #63

Workflow file for this run

name: Weekly clean & rebuild
on:
schedule:
- cron: '0 8 * * 6'
jobs:
build:
name: Build system image without using cache
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: Checkout meta-dts repo
uses: actions/checkout@v2
with:
path: "meta-dts"
- name: Build DTS image
shell: bash
run: |
sed -i '/cache.yml/d' meta-dts/kas.yml
kas-container build meta-dts/kas.yml
deploy-cache:
name: Deploy cache on cache.dasharo.com
if: always()
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 [email protected] "mkdir -p cache/yocto/dts"
rsync -P -e "ssh -i ~/.ssh/dts-ci-key" -rlptD --delete build/sstate-cache [email protected]: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 [email protected]: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