mirror of
https://github.com/onionshare/onionshare.git
synced 2025-07-20 13:29:02 -04:00
Cache snapcraft, but move the cache data into ~/ first
This commit is contained in:
parent
c6b61a852a
commit
c41a13e404
1 changed files with 22 additions and 8 deletions
16
.github/workflows/build.yml
vendored
16
.github/workflows/build.yml
vendored
|
@ -318,12 +318,26 @@ jobs:
|
||||||
- name: Restore cache - snapcraft
|
- name: Restore cache - snapcraft
|
||||||
uses: actions/cache@v3
|
uses: actions/cache@v3
|
||||||
with:
|
with:
|
||||||
path: /root/.cache/snapcraft
|
path: ~/snapcraft-cache
|
||||||
key: snapcraft-cache
|
key: snapcraft-cache
|
||||||
|
|
||||||
|
- name: Move cache from home to root
|
||||||
|
run: |
|
||||||
|
mkdir -p /root/.cache
|
||||||
|
if [[ -d "~/snapcraft-cache" ]]; then
|
||||||
|
mv ~/snapcraft-cache /root/.cache/snapcraft
|
||||||
|
chown -R root:root /root/.cache/snapcraft
|
||||||
|
echo "moved cache from home to root"
|
||||||
|
fi
|
||||||
|
|
||||||
- name: Build snap
|
- name: Build snap
|
||||||
run: sudo snapcraft --use-lxd
|
run: sudo snapcraft --use-lxd
|
||||||
|
|
||||||
|
- name: Move cache root to home
|
||||||
|
run: |
|
||||||
|
mv /root/.cache/snapcraft ~/snapcraft-cache
|
||||||
|
chown -R $USER:$USER ~/snapcraft-cache
|
||||||
|
|
||||||
- uses: actions/upload-artifact@v3
|
- uses: actions/upload-artifact@v3
|
||||||
with:
|
with:
|
||||||
name: snapcraft-build
|
name: snapcraft-build
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue