2023-05-12 08:13:59 +00:00
|
|
|
name: Debian kernels cache
|
2023-05-12 00:39:50 +00:00
|
|
|
|
|
|
|
on:
|
2023-05-12 01:25:05 +00:00
|
|
|
workflow_dispatch:
|
2023-05-12 00:39:50 +00:00
|
|
|
schedule:
|
|
|
|
- cron: '45 0 * * 5'
|
2023-05-12 09:12:18 +00:00
|
|
|
push:
|
|
|
|
paths:
|
|
|
|
- '.github/workflows/debian-cache.yml'
|
2023-05-14 11:06:54 +00:00
|
|
|
- 'distro/debian/snapshot/**'
|
|
|
|
- 'distro/debian/cache.go'
|
|
|
|
- 'distro/debian/kernel.go'
|
2023-05-12 00:39:50 +00:00
|
|
|
|
|
|
|
jobs:
|
|
|
|
debian-cache:
|
|
|
|
name: Build Cache
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v1
|
|
|
|
|
|
|
|
- name: Build
|
|
|
|
run: go build
|
|
|
|
|
|
|
|
- name: Cache
|
2023-05-15 10:35:07 +00:00
|
|
|
run: ./out-of-tree --log-level=trace distro debian cache --path=/home/runner/debian.cache
|
2023-05-12 07:53:23 +00:00
|
|
|
|
|
|
|
- name: Install s3cmd
|
|
|
|
run: sudo apt install s3cmd
|
|
|
|
|
2023-05-12 00:39:50 +00:00
|
|
|
- name: Archive cache
|
|
|
|
uses: actions/upload-artifact@v3
|
|
|
|
with:
|
|
|
|
name: debian-cache
|
|
|
|
path: /home/runner/debian.cache
|
|
|
|
|
2023-05-15 10:35:07 +00:00
|
|
|
- name: Upload cache
|
|
|
|
run: s3cmd put --acl-public /home/runner/debian.cache s3://out-of-tree/1.0.0/ --host=fra1.digitaloceanspaces.com --host-bucket='%(bucket)s.fra1.digitaloceanspaces.com' --access_key=${{ secrets.DIGITALOCEAN_SPACES_ACCESS_KEY }} --secret_key=${{ secrets.DIGITALOCEAN_SPACES_SECRET_KEY }}
|
|
|
|
|
2023-05-12 00:39:50 +00:00
|
|
|
- name: Archive logs
|
2023-05-12 07:59:58 +00:00
|
|
|
if: always()
|
2023-05-12 00:39:50 +00:00
|
|
|
uses: actions/upload-artifact@v3
|
|
|
|
with:
|
|
|
|
name: debian-cache-logs
|
|
|
|
path: /home/runner/.out-of-tree/logs
|