Update python-app.yml

This commit is contained in:
암냥 2025-02-02 14:33:29 +09:00 committed by GitHub
commit a75201526e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -36,52 +36,38 @@ jobs:
${{ runner.os }}-pip- ${{ runner.os }}-pip-
# Cache cookie.json # Cache cookie.json
- name: Cache app/temp/auth - name: Cache cookie.json
uses: actions/cache@v3 uses: actions/cache@v3
with: with:
path: /home/runner/work/today.isangjeong/today.isangjeong/app/temp/auth path: /home/runner/work/today.isangjeong/today.isangjeong/app/temp/auth/cookies.json
key: ${{ runner.os }}-cookie-${{ hashFiles('/home/runner/work/today.isangjeong/today.isangjeong/app/temp/auth/cookies.json') }} key: ${{ runner.os }}-cookie-${{ hashFiles('/home/runner/work/today.isangjeong/today.isangjeong/app/temp/auth/cookies.json') }}
restore-keys: |
${{ runner.os }}-cookie-
- name: Install dependencies - name: Install dependencies (only if requirements.txt changed)
run: | run: |
pwd
python -m pip install --upgrade pip python -m pip install --upgrade pip
if [ -f requirements.txt ] && ! pip freeze | diff - requirements.txt > /dev/null; then pip install -r requirements.txt || echo "No changes in requirements.txt, skipping installation"
pip install -r requirements.txt
else
echo "No changes in requirements.txt, skipping installation"
fi
- name: Set Permission - name: Set Permissions
run: | run: |
cd app chmod +x app/run.sh app/gen-config.sh
chmod +x run.sh
chmod +x gen-config.sh
- name: Generate Config - name: Generate Config
run: | run: |
cd app cd app
pwd
ls -al
./gen-config.sh ./gen-config.sh
cat config.json
- name: Add SSH private key - name: Add SSH private key
run: | run: |
mkdir -p ~/.ssh mkdir -p ~/.ssh
echo "$SSH_PRIVATE_KEY" > ~/.ssh/id_ed25519 echo "$SSH_PRIVATE_KEY" > ~/.ssh/id_ed25519
chmod 600 ~/.ssh/id_ed25519 chmod 600 ~/.ssh/id_ed25519
- name: Start SOCKS proxy with SSH - name: Start SOCKS proxy with SSH
run: | run: |
ssh -o StrictHostKeyChecking=no -i ~/.ssh/id_ed25519 -D 9999 -f -N imnyang@imnya.ng -p5322 ssh -o StrictHostKeyChecking=no -i ~/.ssh/id_ed25519 -D 9999 -f -N imnyang@imnya.ng -p5322
echo "SOCKS proxy started" echo "SOCKS proxy started"
- name: Run - name: Run application
run: | run: |
cd app cd app
pwd
ls -al
./run.sh ./run.sh