Skip to content

Commit

Permalink
Increase swap space
Browse files Browse the repository at this point in the history
Signed-off-by: Roman Nikitenko <rnikiten@redhat.com>
  • Loading branch information
RomanNikitenko committed Oct 27, 2022
1 parent 2232375 commit 751174d
Showing 1 changed file with 14 additions and 17 deletions.
31 changes: 14 additions & 17 deletions .github/workflows/pr-check-image-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,30 +26,27 @@ jobs:
registry: quay.io
username: ${{ secrets.QUAY_USERNAME }}
password: ${{ secrets.QUAY_PASSWORD }}
- name: Add Swap Space
- name: Increase Swap Space # implemented for the Linux system only
if: runner.os == 'Linux'
shell: bash
run: |
echo "Swap before:"
free -h
echo
swapon --show
echo
echo "Current swap area: "
sudo swapon --show
export SWAP_SIZE=7
export SWAP_FILE=$(swapon --show=NAME | tail -n 1)
echo $SWAP_FILE
sudo swapoff $SWAP_FILE
sudo rm $SWAP_FILE
export SWAP_FILE_PATH=$(swapon --show=NAME | tail -n 1)
sudo swapoff $SWAP_FILE_PATH
sudo rm $SWAP_FILE_PATH
sudo fallocate -l ${SWAP_SIZE}G $SWAP_FILE
sudo chmod 600 $SWAP_FILE
sudo mkswap $SWAP_FILE
sudo swapon $SWAP_FILE
sudo fallocate -l ${SWAP_SIZE}G $SWAP_FILE_PATH
sudo chmod 600 $SWAP_FILE_PATH
sudo mkswap $SWAP_FILE_PATH
sudo swapon $SWAP_FILE_PATH
echo "Swap after:"
echo "Updated swap area: "
sudo swapon --show
- name: TEST MAIN Download dev image
- name: TEST PR Download dev image
uses: dawidd6/action-download-artifact@v2
with:
workflow: ${{ github.event.workflow_run.workflow_id }}
Expand Down

0 comments on commit 751174d

Please sign in to comment.