mirror of
https://github.com/onionshare/onionshare.git
synced 2025-07-20 05:22:20 -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
|
||||
uses: actions/cache@v3
|
||||
with:
|
||||
path: /root/.cache/snapcraft
|
||||
path: ~/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
|
||||
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
|
||||
with:
|
||||
name: snapcraft-build
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue