pkgbuild: Add grok-bot-bin from official .deb
Build Arch package / build (push) Failing after 11s

Temporary Arch/CachyOS packaging until upstream ships a native package.
Pulls Cursor's amd64 deb by commit from the linux-x64 update feed.
Includes update script and Gitea Actions for bump + makepkg release.
This commit is contained in:
s1d3sw1ped_bot
2026-09-02 01:10:40 +00:00
parent 581f073b2f
commit 33e191de2b
6 changed files with 280 additions and 1 deletions
+48
View File
@@ -0,0 +1,48 @@
name: Build Arch package
on:
push:
tags: ['v*']
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
container:
image: archlinux:base-devel
steps:
- name: Prepare build user
run: |
pacman -Syu --noconfirm git
useradd -m builder
echo 'builder ALL=(ALL) NOPASSWD: ALL' > /etc/sudoers.d/builder
chmod 440 /etc/sudoers.d/builder
- uses: actions/checkout@v4
- name: Build package
run: |
chown -R builder:builder .
sudo -u builder makepkg -sf --noconfirm
- name: Upload artifact
uses: actions/upload-artifact@v3
with:
name: grok-bot-bin
path: '*.pkg.tar.zst'
if-no-files-found: error
- name: Attach package to Gitea release
if: startsWith(github.ref, 'refs/tags/')
env:
GITEA_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
set -euo pipefail
tag="${GITHUB_REF_NAME}"
ver="${tag#v}"
pkg=$(ls -1 *.pkg.tar.zst | head -1)
api="${GITHUB_API_URL:-https://git.s1d3sw1ped.com/api/v1}/repos/${GITHUB_REPOSITORY}/releases"
# create release if missing
curl -fsS -X POST -H "Authorization: token ${GITEA_TOKEN}" -H "Content-Type: application/json" \
-d "{\"tag_name\":\"${tag}\",\"name\":\"${tag}\",\"body\":\"grok-bot-bin ${ver} (official .deb repackaged)\"}" \
"$api" || true
rid=$(curl -fsS -H "Authorization: token ${GITEA_TOKEN}" "$api/tags/${tag}" | jq -r .id)
curl -fsS -X POST -H "Authorization: token ${GITEA_TOKEN}" \
-H "Content-Type: application/octet-stream" \
--data-binary @"$pkg" \
"${GITHUB_SERVER_URL:-https://git.s1d3sw1ped.com}/api/v1/repos/${GITHUB_REPOSITORY}/releases/${rid}/assets?name=$(basename "$pkg")"
+29
View File
@@ -0,0 +1,29 @@
name: Check for new release
on:
schedule:
- cron: '17 6 * * *'
workflow_dispatch:
jobs:
update:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Bump PKGBUILD if a new version is out
run: |
set -euo pipefail
sudo apt-get update -qq
sudo apt-get install -y -qq jq curl
before=$(sed -n 's/^pkgver=//p' PKGBUILD)
./scripts/update.sh
after=$(sed -n 's/^pkgver=//p' PKGBUILD)
if [[ "$before" == "$after" ]]; then
echo "No bump"
exit 0
fi
git config user.name 's1d3sw1ped_bot'
git config user.email 's1d3sw1ped_bot@git.s1d3sw1ped.com'
git add PKGBUILD .SRCINFO
git commit -m "pkgbuild: Bump grok-bot-bin to ${after}"
git tag "v${after}"
git push origin "HEAD:${GITHUB_REF_NAME}" "v${after}"