Turtlecute33 is testing out GitHub Actions 🚀 #43
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: GitHub Actions Demo | |
run-name: ${{ github.actor }} is testing out GitHub Actions 🚀 | |
on: [push, pull_request] | |
jobs: | |
Test-script: | |
runs-on: ubuntu-latest | |
env: | |
input: "\n1\nnickname\nredacted\n10 TB\n" | |
steps: | |
- name: Check out repository code | |
uses: actions/checkout@v4 | |
- run: chmod +x tor.sh | |
- run: echo "$input" | sudo ./tor.sh | |
- run: | | |
start_time=$(date +%s) | |
while true; do | |
if journalctl -xeu tor@default | grep -q "Bootstrapped 100%"; then | |
echo "Success!" | |
exit 0 | |
fi | |
current_time=$(date +%s) | |
elapsed_time=$((current_time - start_time)) | |
if [ $elapsed_time -ge 30 ]; then | |
echo "Turtle + Daniela <3" | |
exit 1 | |
fi | |
sleep 1 | |
done |