Comment out swap steps for testing
Some checks failed
Docker build on tag / Build and push to DockerHub (push) Has been cancelled
Some checks failed
Docker build on tag / Build and push to DockerHub (push) Has been cancelled
This commit is contained in:
parent
2a2e8beb1d
commit
fed8aed060
52
.github/workflows/on-tag.yml
vendored
52
.github/workflows/on-tag.yml
vendored
@ -20,34 +20,34 @@ jobs:
|
||||
timeout-minutes: 120
|
||||
name: Build and push to DockerHub
|
||||
steps:
|
||||
# Workaround based on JonasAlfredsson/docker-on-tmpfs@v1.0.1
|
||||
- name: Replace the current swap file
|
||||
shell: bash
|
||||
run: |
|
||||
sudo swapoff /mnt/swapfile || true
|
||||
sudo rm -v /mnt/swapfile
|
||||
sudo fallocate -l 20G /mnt/swapfile
|
||||
sudo chmod 600 /mnt/swapfile
|
||||
sudo mkswap /mnt/swapfile
|
||||
sudo swapon /mnt/swapfile
|
||||
# # Workaround based on JonasAlfredsson/docker-on-tmpfs@v1.0.1
|
||||
# - name: Replace the current swap file
|
||||
# shell: bash
|
||||
# run: |
|
||||
# sudo swapoff /mnt/swapfile || true
|
||||
# sudo rm -v /mnt/swapfile
|
||||
# sudo fallocate -l 20G /mnt/swapfile
|
||||
# sudo chmod 600 /mnt/swapfile
|
||||
# sudo mkswap /mnt/swapfile
|
||||
# sudo swapon /mnt/swapfile
|
||||
|
||||
- name: Show current memory and swap status
|
||||
shell: bash
|
||||
run: |
|
||||
sudo free -h
|
||||
echo
|
||||
sudo swapon --show
|
||||
# - name: Show current memory and swap status
|
||||
# shell: bash
|
||||
# run: |
|
||||
# sudo free -h
|
||||
# echo
|
||||
# sudo swapon --show
|
||||
|
||||
- name: Mount a tmpfs over /var/lib/docker
|
||||
shell: bash
|
||||
run: |
|
||||
if [ ! -d "/var/lib/docker" ]; then
|
||||
echo "Directory '/var/lib/docker' not found"
|
||||
exit 1
|
||||
fi
|
||||
sudo mount -t tmpfs -o size=10G tmpfs /var/lib/docker
|
||||
sudo systemctl restart docker
|
||||
sudo df -h | grep docker
|
||||
# - name: Mount a tmpfs over /var/lib/docker
|
||||
# shell: bash
|
||||
# run: |
|
||||
# if [ ! -d "/var/lib/docker" ]; then
|
||||
# echo "Directory '/var/lib/docker' not found"
|
||||
# exit 1
|
||||
# fi
|
||||
# sudo mount -t tmpfs -o size=10G tmpfs /var/lib/docker
|
||||
# sudo systemctl restart docker
|
||||
# sudo df -h | grep docker
|
||||
|
||||
- name: Set env variables
|
||||
run: echo "TAG=${GITHUB_REF/refs\/tags\//}" >> $GITHUB_ENV
|
||||
|
||||
Loading…
Reference in New Issue
Block a user