-
Notifications
You must be signed in to change notification settings - Fork 13
48 lines (40 loc) · 1.2 KB
/
actions.yml
File metadata and controls
48 lines (40 loc) · 1.2 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
name: Scope Moniter
on:
schedule:
- cron: '*/10 * * * *'
push:
branches:
- main
# Actions project permission
permissions:
contents: write
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Check out repository
uses: actions/checkout@v3
- name: Installing tar and unew via binary
run: |
sudo apt install unzip -y
sudo apt install tar
wget https://github.com/rix4uni/unew/releases/download/v0.0.5/unew-linux-amd64-0.0.5.tgz
tar -xvzf unew-linux-amd64-0.0.5.tgz
mv unew /usr/local/bin/unew
rm -rf unew-linux-amd64-0.0.5.tgz
- name: Running scope_moniter.sh
run: |
bash scope_moniter.sh
- name: Commit and push changes if there are any
run: |
git config --global user.name 'GitHub Actions'
git config --global user.email 'actions@users.noreply.github.com'
git add .
# Check if there are changes before committing
if ! git diff --cached --exit-code; then
IST_DATE=$(TZ='Asia/Kolkata' date +'%a %b %d %H:%M:%S IST %Y')
git commit -m "Updated List: $IST_DATE"
git push
else
echo "No changes to commit"
fi