Skip to content

Test the project and update the test-date #834

Test the project and update the test-date

Test the project and update the test-date #834

Workflow file for this run

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
SMALL_BUSINESS_KEY=1
EMAIL_API=mailticking
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 ${EMAIL_API} --skip-update-check --no-logo --disable-progress-bar
done
echo -e "\nAccounts generated:" >> $GITHUB_STEP_SUMMARY
cat ./*ACCOUNTS.txt >> $GITHUB_STEP_SUMMARY
fi
if [[ ${KEY} != 0 && ${SMALL_BUSINESS_KEY} != 0 ]]
then
if [[ ${KEY} != 0 ]]
then
for ((attempt=1;attempt<=${KEY};++attempt))
do
python3 main.py --chrome --key --email-api ${EMAIL_API} --skip-update-check --no-logo --disable-progress-bar
done
fi
if [[ ${SMALL_BUSINESS_KEY} != 0 ]]
then
for ((attempt=1;attempt<=${SMALL_BUSINESS_KEY};++attempt))
do
python3 main.py --chrome --small-business-key --email-api ${EMAIL_API} --skip-update-check --no-logo --disable-progress-bar
done
fi
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 }}