Skip to content

Commit

Permalink
Update monitoring workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
jvsguerra committed Jan 16, 2025
1 parent 3bb847e commit d4737b9
Showing 1 changed file with 6 additions and 8 deletions.
14 changes: 6 additions & 8 deletions .github/workflows/statistics.yml
Original file line number Diff line number Diff line change
@@ -1,15 +1,13 @@
name: KVFinder-web service job submission statistics
name: Job submission statistics
on:
schedule:
- cron: '0 0 1 * *'
push:
branches: [master]
workflow_dispatch:

jobs:

data:
name: Get job submission data
name: Produce usage statistics
runs-on: ubuntu-latest

steps:
Expand All @@ -20,15 +18,15 @@ jobs:
id: date
run: echo "::set-output name=date::$(date +'%Y-%m')"

- name: Get data from the server
- name: Get job submission data (usage.txt)
uses: appleboy/[email protected]
with:
host: ${{ secrets.HOST }}
username: ${{ secrets.USERNAME }}
password: ${{ secrets.PASSWORD }}
script: |
echo ${{ secrets.PASSWORD }} | sudo -S su - -c "cat /home/${{ secrets.USERNAME }}/01_2023_to_12_2024.txt > /home/${{ secrets.USERNAME }}/usage.txt && ls /var/lib/containers/storage/volumes/kvfinder_web_service_kvfinder-jobs/_data -lhrt --time-style=long-iso >> /home/${{ secrets.USERNAME }}/usage.txt"
scp-copy:
name: Copy job submission data
runs-on: ubuntu-latest
Expand Down Expand Up @@ -76,5 +74,5 @@ jobs:
host: ${{ secrets.HOST }}
username: ${{ secrets.USERNAME }}
password: ${{ secrets.PASSWORD }}
script: |
echo ${{ secrets.PASSWORD }} | sudo -S su - -c "rm /home/${{ secrets.USERNAME }}/usage.txt"
script: |
echo ${{ secrets.PASSWORD }} | sudo -S su - -c "rm /home/${{ secrets.USERNAME }}/usage.txt"

0 comments on commit d4737b9

Please sign in to comment.