Commit 993d523ea9

993d523ea9edcc9bb10a1ee97716e5ef6b8d0ed7

parent: 909c7069ce

Unsigned

Wraient <wraient.911@gmail.com> · 2025-08-26 22:34 UTC

fix: ci/cd

Layout: unified · split

.github/workflows/update-aur.yml +28 −4
@@ -40,7 +40,10 @@ jobs:
40 - name: Set up SSH for AUR 40 - name: Set up SSH for AUR
41 run: | 41 run: |
42 mkdir -p ~/.ssh 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 chmod 600 ~/.ssh/aur_rsa 47 chmod 600 ~/.ssh/aur_rsa
45 48
46 # Create SSH config for AUR 49 # Create SSH config for AUR
@@ -50,6 +53,7 @@ jobs:
50 User aur 53 User aur
51 IdentityFile ~/.ssh/aur_rsa 54 IdentityFile ~/.ssh/aur_rsa
52 StrictHostKeyChecking no 55 StrictHostKeyChecking no
56 IdentitiesOnly yes
53 EOF 57 EOF
54 58
55 # Start SSH agent and add key with passphrase 59 # Start SSH agent and add key with passphrase
@@ -59,11 +63,31 @@ jobs:
59 63
60 # Use expect to add the key with passphrase 64 # Use expect to add the key with passphrase
61 expect -c " 65 expect -c "
66 set timeout 10
62 spawn ssh-add ~/.ssh/aur_rsa 67 spawn ssh-add ~/.ssh/aur_rsa
63 expect \"Enter passphrase\" 68 expect {
64 send \"sex\r\" 69 \"Enter passphrase\" {
65 expect eof 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 - name: Clone AUR repository 92 - name: Clone AUR repository
69 run: | 93 run: |