Commit 993d523ea9
Unsigned
Layout: unified · split
.github/workflows/update-aur.yml +28 −4
| @@ -40,7 +40,10 @@ jobs: | ||
| 40 | 40 | - name: Set up SSH for AUR |
| 41 | 41 | run: | |
| 42 | 42 | mkdir -p ~/.ssh |
| 43 | echo "${{ secrets.AUR_SSH_KEY }}" > ~/.ssh/aur_rsa | |
| 43 | # Write the SSH key, ensuring proper formatting | |
| 44 | cat > ~/.ssh/aur_rsa << 'EOF' | |
| 45 | ${{ secrets.AUR_SSH_KEY }} | |
| 46 | EOF | |
| 44 | 47 | chmod 600 ~/.ssh/aur_rsa |
| 45 | 48 | |
| 46 | 49 | # Create SSH config for AUR |
| @@ -50,6 +53,7 @@ jobs: | ||
| 50 | 53 | User aur |
| 51 | 54 | IdentityFile ~/.ssh/aur_rsa |
| 52 | 55 | StrictHostKeyChecking no |
| 56 | IdentitiesOnly yes | |
| 53 | 57 | EOF |
| 54 | 58 | |
| 55 | 59 | # Start SSH agent and add key with passphrase |
| @@ -59,11 +63,31 @@ jobs: | ||
| 59 | 63 | |
| 60 | 64 | # Use expect to add the key with passphrase |
| 61 | 65 | expect -c " |
| 66 | set timeout 10 | |
| 62 | 67 | spawn ssh-add ~/.ssh/aur_rsa |
| 63 | expect \"Enter passphrase\" | |
| 64 | send \"sex\r\" | |
| 65 | expect eof | |
| 68 | expect { | |
| 69 | \"Enter passphrase\" { | |
| 70 | send \"sex\r\" | |
| 71 | exp_continue | |
| 72 | } | |
| 73 | \"Identity added\" { | |
| 74 | puts \"Key successfully added\" | |
| 75 | } | |
| 76 | \"Bad passphrase\" { | |
| 77 | puts \"Bad passphrase\" | |
| 78 | exit 1 | |
| 79 | } | |
| 80 | timeout { | |
| 81 | puts \"Timeout waiting for passphrase prompt\" | |
| 82 | exit 1 | |
| 83 | } | |
| 84 | eof | |
| 85 | } | |
| 66 | 86 | " |
| 87 | ||
| 88 | # Test SSH connection (output suppressed for security) | |
| 89 | echo "Testing SSH connection to AUR..." | |
| 90 | ssh -T aur@aur.archlinux.org >/dev/null 2>&1 && echo "SSH connection successful" || echo "SSH connection failed (this might be normal for AUR)" | |
| 67 | 91 | |
| 68 | 92 | - name: Clone AUR repository |
| 69 | 93 | run: | |