45 lines
1.2 KiB
YAML
45 lines
1.2 KiB
YAML
name: Debian kernels cache
|
|
|
|
on:
|
|
workflow_dispatch:
|
|
schedule:
|
|
- cron: '0 4 * * *'
|
|
push:
|
|
paths:
|
|
- '.github/workflows/debian-cache.yml'
|
|
- 'distro/debian/snapshot/**'
|
|
- 'distro/debian/cache.go'
|
|
- 'distro/debian/kernel.go'
|
|
|
|
jobs:
|
|
debian-cache:
|
|
name: Build Cache
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v1
|
|
|
|
- name: Build
|
|
run: go build
|
|
|
|
- name: Cache
|
|
run: ./out-of-tree --log-level=trace distro debian cache --refetch=0
|
|
|
|
- name: Install s3cmd
|
|
run: sudo apt install s3cmd
|
|
|
|
- name: Archive cache
|
|
uses: actions/upload-artifact@v3
|
|
with:
|
|
name: debian-cache
|
|
path: ~/.out-of-tree/debian.cache
|
|
|
|
- name: Archive logs
|
|
if: always()
|
|
uses: actions/upload-artifact@v3
|
|
with:
|
|
name: debian-cache-logs
|
|
path: ~/.out-of-tree/logs
|
|
|
|
- name: Upload cache
|
|
run: s3cmd put --acl-public ~/.out-of-tree/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 }}
|