mirror of
https://github.com/onionshare/onionshare.git
synced 2025-06-22 05:24:14 -04:00
Try compresing snap cache
This commit is contained in:
parent
dffec4441a
commit
1cf8aa4253
1 changed files with 9 additions and 19 deletions
28
.github/workflows/build.yml
vendored
28
.github/workflows/build.yml
vendored
|
@ -261,42 +261,32 @@ jobs:
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v3
|
||||||
|
|
||||||
- name: Initialize LXD/LXC
|
|
||||||
run: |
|
|
||||||
sudo lxd init --auto
|
|
||||||
sudo lxc storage list
|
|
||||||
|
|
||||||
- name: Prepare cacheable directory
|
|
||||||
run: mkdir -p ~/lxd_cache
|
|
||||||
|
|
||||||
- name: Restore cache - lxd
|
- name: Restore cache - lxd
|
||||||
uses: actions/cache@v3
|
uses: actions/cache@v3
|
||||||
with:
|
with:
|
||||||
path: ~/lxd_cache
|
path: ~/lxd_cache.tar.gz
|
||||||
key: snap-lxd-${{ hashFiles('snap/snapcraft.yaml') }}
|
key: snap-lxd-${{ hashFiles('snap/snapcraft.yaml') }}
|
||||||
|
|
||||||
- name: Restore cached content to lxd directory
|
- name: Decompress cached content to lxd directory
|
||||||
run: |
|
run: |
|
||||||
if [ -d "~/lxd_cache" ]; then
|
if [ -f "~/lxd_cache.tar.gz" ]; then
|
||||||
sudo rsync -a ~/lxd_cache/ /var/snap/lxd/common/lxd/storage-pools/default/
|
sudo tar -xzf ~/lxd_cache.tar.gz -C /
|
||||||
sudo chown -R root:root /var/snap/lxd/common/lxd/storage-pools/default/
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
run: |
|
run: |
|
||||||
|
sudo lxd init --auto
|
||||||
|
sudo lxc storage list
|
||||||
sudo snap install snapcraft --classic
|
sudo snap install snapcraft --classic
|
||||||
sudo ufw disable
|
sudo ufw disable
|
||||||
|
|
||||||
- name: Build snap
|
- name: Build snap
|
||||||
run: sudo snapcraft
|
run: sudo snapcraft
|
||||||
|
|
||||||
- name: Copy lxd directory to cacheable directory
|
- name: Compress lxd directory and set proper permissions
|
||||||
run: |
|
run: |
|
||||||
sudo rsync -a /var/snap/lxd/common/lxd/storage-pools/default/ ~/lxd_cache/
|
sudo tar -czf ~/lxd_cache.tar.gz /var/snap/lxd/common/lxd/storage-pools/default
|
||||||
sudo chown -R $USER:$USER ~/lxd_cache/
|
sudo chown $USER:$USER ~/lxd_cache.tar.gz
|
||||||
sudo find ~/lxd_cache/
|
|
||||||
sudo ls -l ~/lxd_cache/
|
|
||||||
sudo ~/lxd_cache/*
|
|
||||||
|
|
||||||
- uses: actions/upload-artifact@v3
|
- uses: actions/upload-artifact@v3
|
||||||
with:
|
with:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue