-
Notifications
You must be signed in to change notification settings - Fork 821
57 lines (56 loc) · 2.09 KB
/
test.yml
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
49
50
51
52
53
54
55
56
57
name: Test the project and update the test-date
on:
schedule:
- cron: '0 */12 * * *'
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
jobs:
Test:
runs-on: ubuntu-latest
steps:
- name: 'Checkout Repo'
uses: actions/checkout@v4
with:
persist-credentials: false
fetch-depth: 0
- name: 'Generate key and update the test time'
run: |
ACCOUNT=0
KEY=1
git config --local user.email "41898282+github-actions[bot]@users.noreply.github.com"
git config --local user.name "github-actions[bot]"
git clone --depth 1 https://github.com/rzc0d3r/ESET-KeyGen.git
cd ESET-KeyGen
sudo apt update
sudo apt install python3-pip
sudo pip install -r requirements.txt
echo "Test results:" >> $GITHUB_STEP_SUMMARY
if [[ ${ACCOUNT} != 0 ]]
then
for ((attempt=1;attempt<=${ACCOUNT};++attempt))
do
python3 main.py --chrome --account --email-api guerrillamail --skip-update-check
done
echo -e "\nAccounts generated:" >> $GITHUB_STEP_SUMMARY
cat ./*ACCOUNTS.txt >> $GITHUB_STEP_SUMMARY
fi
if [[ ${KEY} != 0 ]]
then
for ((attempt=1;attempt<=${KEY};++attempt))
do
python3 main.py --chrome --key --email-api guerrillamail --skip-update-check
done
echo -e "\nKeys generated:" >> $GITHUB_STEP_SUMMARY
cat ./*KEYS.txt >> $GITHUB_STEP_SUMMARY
fi
echo
cd ${{ github.workspace }}
sed -i '/^ESET-KeyGen - Trial-Key & Account generator/ c\ESET-KeyGen - Trial-Key & Account generator for ESET Antivirus (last test was on '"$(date -u --date='3 hours' +"%d.%m.%Y at %H:%M UTC+3")"')' README.md
sudo rm -r ESET-KeyGen
git pull
git commit -m "Update test time" -a
- name: Push changes to the repo
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.PAT }}
branch: ${{ github.ref }}