We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4b8d196 commit 81bfdfcCopy full SHA for 81bfdfc
1 file changed
.github/workflows/devsh-foss-image.yml
@@ -102,10 +102,16 @@ jobs:
102
if: steps.cache-bundle.outputs.cache-hit != 'true'
103
run: |
104
set -euo pipefail
105
- sudo fallocate -l 8G /swapfile || sudo dd if=/dev/zero of=/swapfile bs=1M count=8192
106
- sudo chmod 600 /swapfile
107
- sudo mkswap /swapfile
108
- sudo swapon /swapfile
+ if swapon --show=NAME --noheadings | grep -qx '/swapfile'; then
+ echo "/swapfile is already active"
+ free -h
+ exit 0
109
+ fi
110
+ swapfile="/mnt/devsh-swapfile-${GITHUB_RUN_ID}"
111
+ sudo fallocate -l 8G "${swapfile}" || sudo dd if=/dev/zero of="${swapfile}" bs=1M count=8192
112
+ sudo chmod 600 "${swapfile}"
113
+ sudo mkswap "${swapfile}"
114
+ sudo swapon "${swapfile}"
115
free -h
116
117
- name: Cache Vite
0 commit comments