Skip to content

Commit c737e83

Browse files
committed
[ci] Removed AUR github-action, use regular shell commands instead
dssh-origin: e1411bc
1 parent 2e49efa commit c737e83

1 file changed

Lines changed: 57 additions & 16 deletions

File tree

.github/workflows/aur.yml

Lines changed: 57 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -44,13 +44,34 @@ jobs:
4444
SHA=$(sha256sum src.tar.gz | awk '{print $1}')
4545
echo "sha256=$SHA" >> "$GITHUB_OUTPUT"
4646
47-
- name: Render PKGBUILD
47+
- name: Setup SSH for AUR
4848
run: |
49-
mkdir -p aur-out
50-
cat > aur-out/PKGBUILD <<EOF
49+
mkdir -p ~/.ssh
50+
chmod 700 ~/.ssh
51+
printf '%s\n' "${{ secrets.AUR_SSH_PRIVATE_KEY }}" > ~/.ssh/aur
52+
chmod 600 ~/.ssh/aur
53+
ssh-keyscan -t rsa,ecdsa,ed25519 aur.archlinux.org >> ~/.ssh/known_hosts 2>/dev/null
54+
cat > ~/.ssh/config <<EOF
55+
Host aur.archlinux.org
56+
User aur
57+
IdentityFile ~/.ssh/aur
58+
IdentitiesOnly yes
59+
StrictHostKeyChecking yes
60+
EOF
61+
chmod 600 ~/.ssh/config
62+
63+
- name: Clone AUR repo
64+
run: git clone ssh://aur@aur.archlinux.org/dssh.git aur-repo
65+
66+
- name: Render PKGBUILD & .SRCINFO
67+
env:
68+
PKGVER: ${{ steps.version.outputs.pkgver }}
69+
SHA256: ${{ steps.sha.outputs.sha256 }}
70+
run: |
71+
cat > aur-repo/PKGBUILD <<EOF
5172
# Maintainer: Linus Grolmes <linus@grolmes.de>
5273
pkgname=dssh
53-
pkgver=${{ steps.version.outputs.pkgver }}
74+
pkgver=${PKGVER}
5475
pkgrel=1
5576
pkgdesc="The only SSH connection manager you'll ever need. CLI & TUI."
5677
arch=('x86_64' 'aarch64')
@@ -59,7 +80,7 @@ jobs:
5980
makedepends=('go')
6081
depends=('openssh')
6182
source=("\$pkgname-\$pkgver.tar.gz::https://github.com/madLinux7/dssh/archive/v\$pkgver.tar.gz")
62-
sha256sums=('${{ steps.sha.outputs.sha256 }}')
83+
sha256sums=('${SHA256}')
6384
6485
build() {
6586
cd "\$pkgname-\$pkgver"
@@ -74,14 +95,34 @@ jobs:
7495
}
7596
EOF
7697
77-
- name: Publish to AUR
78-
uses: KSXGitHub/github-actions-deploy-aur@2ac5a4c1d7035885d46b10e3193393be8460b6f1 # v4.1.1
79-
with:
80-
pkgname: dssh
81-
pkgbuild: aur-out/PKGBUILD
82-
commit_username: Linus Grolmes
83-
commit_email: linus@grolmes.de
84-
ssh_private_key: ${{ secrets.AUR_SSH_PRIVATE_KEY }}
85-
commit_message: "[ci] Update to ${{ steps.version.outputs.tag }}"
86-
ssh_keyscan_types: rsa,ecdsa,ed25519
87-
updpkgsums: false
98+
cat > aur-repo/.SRCINFO <<EOF
99+
pkgbase = dssh
100+
pkgdesc = The only SSH connection manager you'll ever need. CLI & TUI.
101+
pkgver = ${PKGVER}
102+
pkgrel = 1
103+
url = https://github.com/madLinux7/dssh
104+
arch = x86_64
105+
arch = aarch64
106+
license = MIT
107+
makedepends = go
108+
depends = openssh
109+
source = dssh-${PKGVER}.tar.gz::https://github.com/madLinux7/dssh/archive/v${PKGVER}.tar.gz
110+
sha256sums = ${SHA256}
111+
112+
pkgname = dssh
113+
EOF
114+
115+
- name: Commit & push
116+
working-directory: aur-repo
117+
env:
118+
TAG: ${{ steps.version.outputs.tag }}
119+
run: |
120+
git config user.name "Linus Grolmes"
121+
git config user.email "linus@grolmes.de"
122+
git add PKGBUILD .SRCINFO
123+
if git diff --cached --quiet; then
124+
echo "No changes to publish"
125+
exit 0
126+
fi
127+
git commit -m "[ci] Update to ${TAG}"
128+
git push

0 commit comments

Comments
 (0)