From 3a7690b701faae179d1d87307505480108710890 Mon Sep 17 00:00:00 2001 From: Louis Waweru Date: Sun, 15 May 2022 23:31:25 -0400 Subject: [PATCH] simple install; named artifacts --- .github/workflows/deploy20-04.yml | 16 +++++++++------- .github/workflows/test-swapping20-04.yml | 2 +- README.md | 14 +++++++++++--- 3 files changed, 21 insertions(+), 11 deletions(-) diff --git a/.github/workflows/deploy20-04.yml b/.github/workflows/deploy20-04.yml index d1fd0c9..4cc6086 100644 --- a/.github/workflows/deploy20-04.yml +++ b/.github/workflows/deploy20-04.yml @@ -51,6 +51,10 @@ jobs: run: sudo dpkg --install makeswap-on-azure.service.deb - name: ENABLE run: sudo systemctl enable makeswap-on-azure.service + - name: START + run: sudo systemctl start makeswap-on-azure + - name: RESTART + run: sudo systemctl restart makeswap-on-azure - name: DISABLE run: sudo systemctl disable makeswap-on-azure.service - name: INSTALL @@ -59,26 +63,24 @@ jobs: run: sudo systemctl enable makeswap-on-azure.service - name: START run: sudo systemctl start makeswap-on-azure - - name: JOURNALCTL1 - run: journalctl -xe --unit makeswap-on-azure --lines 20 --no-pager > ~/.github/artifacts/deploy20-04.journalctl1.log - name: DISABLE run: sudo systemctl disable makeswap-on-azure.service - name: REMOVE run: sudo dpkg --remove makeswap-on-azure.service + - name: JOURNALCTL1 + run: journalctl -xe --unit makeswap-on-azure --no-pager > ~/.github/artifacts/deploy20-04.unit.log - name: JOURNALCTL2 - run: journalctl -xe --no-pager > ~/.github/artifacts/deploy20-04.journalctl2.log + run: journalctl -xe --no-pager > ~/.github/artifacts/deploy20-04.full.log - name: log to stdout run: journalctl -xe --unit makeswap-on-azure --no-pager - name: killswitch-strings run: wget https://raw.githubusercontent.com/soyfrien/makeswap-on-azure.service/main/.github/workflows/exception-strings - - name: killswitch-log - run: journalctl -xe --unit makeswap-on-azure --no-pager > killswitch.log - name: killswitch - run: count=$(grep -f exception-strings killswitch.log | wc -l); if [[ $count > 0 ]]; then exit 1; fi + run: count=$(grep -f exception-strings ~/.github/artifacts/deploy20-04.unit.log | wc -l); if [[ $count > 0 ]]; then exit 1; fi - uses: actions/upload-artifact@v3 id: upload with: - name: artifact20-04 + name: journalctl-full-and-unit path: ~/.github/artifacts - name: Display structure of uploaded files run: ls -R diff --git a/.github/workflows/test-swapping20-04.yml b/.github/workflows/test-swapping20-04.yml index 8bdb5fb..81a085b 100644 --- a/.github/workflows/test-swapping20-04.yml +++ b/.github/workflows/test-swapping20-04.yml @@ -71,7 +71,7 @@ jobs: - uses: actions/upload-artifact@v3 id: upload with: - name: artifact20-04 + name: journalctl-makeswap-on-azure path: ~/.github/artifacts - name: Display structure of uploaded files run: ls -R diff --git a/README.md b/README.md index 4283c43..4798184 100644 --- a/README.md +++ b/README.md @@ -24,12 +24,20 @@ Ensures a swapfile exists or is created on the volatile temporary drive in an Az # Usage ## Install -### Clone, build and install ``` -mkdir ~/git && cd ~/git +wget https://github.com/ppdac/makeswap-on-azure.service/releases/latest/download/makeswap-on-azure.service.deb +sudo dpkg --install ~/git/makeswap-on-azure.service.deb +``` + + +### Build from latest source +``` +mkdir ~/git; cd ~/git git clone https://github.com/ppdac/makeswap-on-azure.service.git -rm -rf ~/git/makeswap-on-azure.service/.git* +rm -rf ~/git/makeswap-on-azure.service/.git +rm -rf ~/git/makeswap-on-azure.service/.github + dpkg-deb --build ~/git/makeswap-on-azure.service sudo dpkg --install ~/git/makeswap-on-azure.service.deb sudo systemctl enable makeswap-on-azure.service