Compare commits

...

3 Commits

Author SHA1 Message Date
e7dac7f6f8 Add mini.nvim
All checks were successful
Main workflow / build (pull_request) Successful in 12s
Main workflow / build (push) Successful in 12s
2025-08-02 13:35:34 +02:00
e304f4e0bb Add main repository
Some checks failed
Main workflow / build (pull_request) Failing after 7s
2025-08-02 13:33:45 +02:00
7703c9294a Add CI
Some checks failed
Main workflow / build (pull_request) Failing after 7s
2025-08-02 13:32:13 +02:00
5 changed files with 131 additions and 0 deletions

93
.github/workflows/main.yaml vendored Normal file
View File

@@ -0,0 +1,93 @@
---
name: Main workflow
on:
pull_request:
push:
branches:
- main
env:
BASE_URL: https://git.mug.lv/api/packages/mug/alpine
PACKAGER: Galen Abell <galen@galenabell.com>
RELEASE: '3.22'
REPOSITORY: main
jobs:
build:
runs-on: ubuntu-24.04
timeout-minutes: 30
container:
image: alpine:${{ env.RELEASE }}
steps:
- name: Install dependencies
run: apk add abuild bash curl doas git lua-aports nodejs
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup abuild
run: |
cat <<EOF | tee /etc/apk/repositories
$BASE_URL/v$RELEASE/$REPOSITORY
https://dl-cdn.alpinelinux.org/alpine/v$RELEASE/main
https://dl-cdn.alpinelinux.org/alpine/v$RELEASE/community
EOF
curl -sJO --output-dir /etc/apk/keys "$BASE_URL/key"
apk update || true
printf 'PACKAGER="%s"' "$PACKAGER" | tee -a /etc/abuild.conf
echo "permit nopass :wheel" >/etc/doas.conf
mkdir -p /var/cache/distfiles
chmod a+w /var/cache/distfiles
abuild-keygen -ain
- name: Get changed packages
id: changed
shell: bash
run: |
if [ "$GITHUB_EVENT_NAME" = 'push' ]; then
aports="$(git show \
--pretty= \
--name-only \
--diff-filter=ACMR \
--relative="$REPOSITORY" \
HEAD -- '*/APKBUILD' | xargs -rn1 dirname)"
else
aports="$(git diff \
--name-only \
--diff-filter=ACMR \
--relative="$REPOSITORY" \
origin/main...HEAD -- '*/APKBUILD' | xargs -rn1 dirname)"
fi
packages="$(ap builddirs -d "$(pwd)/$REPOSITORY" "$aports" 2>/dev/null | xargs -rn1 basename)"
echo "packages=$packages" | tee -a "$GITHUB_OUTPUT"
- name: Build packages
if: ${{ steps.changed.outputs.packages != '' }}
run: |
for package in $CHANGED_PACKAGES; do
(cd "$REPOSITORY/$package" && abuild -Fr)
done
env:
CHANGED_PACKAGES: ${{ steps.changed.outputs.packages }}
- name: Upload packages
if: ${{ github.event_name == 'push' && steps.changed.outputs.packages != '' }}
shell: bash
run: |
find "$HOME/packages" -type f -name '*.apk' | while read -r pkg; do
curl --user "$USER:$PASSWORD" \
--fail-with-body \
-X DELETE \
"$BASE_URL/$RELEASE/$REPOSITORY/$(uname -m)/$(basename "$pkg")" || echo 'package does not already exist'
curl --user "$USER:$PASSWORD" \
--fail-with-body \
--upload-file "$pkg" \
"$BASE_URL/$RELEASE/$REPOSITORY"
done
env:
PASSWORD: ${{ secrets.PACKAGES_TOKEN }}
USER: ${{ github.repository_owner }}

View File

@@ -0,0 +1,2 @@
$mirror/$version/main
$mirror/$version/community

30
main/mini.nvim/APKBUILD Normal file
View File

@@ -0,0 +1,30 @@
# Contributor: Galen Abell <galen@galenabell.com>
# Maintainer: Galen Abell <galen@galenabell.com>
# renovate: datasource=github-tags packageName=echasnovski/mini.nvim
pkgname=mini.nvim
pkgver=0.16.0
pkgrel=0
pkgdesc="Library of 35+ independent Lua modules improving overall Neovim experience with minimal effort"
url="https://github.com/echasnovski/mini.nvim"
arch="noarch"
license="MIT"
subpackages="$pkgname-doc"
install="$pkgname-doc.post-install $pkgname-doc.post-upgrade"
options="!check"
source="$pkgname-$pkgver.tar.gz::https://github.com/echasnovski/mini.nvim/archive/refs/tags/v$pkgver.tar.gz"
package() {
install -dm755 "$pkgdir"/usr/share/nvim/site
cp -ra doc lua "$pkgdir"/usr/share/nvim/site
install -Dm644 LICENSE "$pkgdir"/usr/share/licenses/$pkgname/LICENSE
}
doc() {
default_doc
amove usr/share/nvim/site/doc
}
sha512sums="
ee3d70c46a9684380bc18f5781abb211928d24387a568a6c6d2a60805c0df038b48fdaea7a04cec4af55e288064ad2cdd9f594d392c106479eee4ee488db55a5 mini.nvim-0.16.0.tar.gz
"

View File

@@ -0,0 +1,3 @@
#!/bin/sh
/usr/bin/nvim -u NONE -esX "+helptags /usr/share/nvim/site/doc" +q

View File

@@ -0,0 +1,3 @@
#!/bin/sh
/usr/bin/nvim -u NONE -esX "+helptags /usr/share/nvim/site/doc" +q