Compare commits
3 Commits
5e40656165
...
e7dac7f6f8
| Author | SHA1 | Date | |
|---|---|---|---|
| e7dac7f6f8 | |||
| e304f4e0bb | |||
| 7703c9294a |
93
.github/workflows/main.yaml
vendored
Normal file
93
.github/workflows/main.yaml
vendored
Normal 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 }}
|
||||
2
main/.rootbld-repositories
Normal file
2
main/.rootbld-repositories
Normal file
@@ -0,0 +1,2 @@
|
||||
$mirror/$version/main
|
||||
$mirror/$version/community
|
||||
30
main/mini.nvim/APKBUILD
Normal file
30
main/mini.nvim/APKBUILD
Normal 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
|
||||
"
|
||||
3
main/mini.nvim/mini.nvim-doc.post-install
Normal file
3
main/mini.nvim/mini.nvim-doc.post-install
Normal file
@@ -0,0 +1,3 @@
|
||||
#!/bin/sh
|
||||
|
||||
/usr/bin/nvim -u NONE -esX "+helptags /usr/share/nvim/site/doc" +q
|
||||
3
main/mini.nvim/mini.nvim-doc.post-upgrade
Normal file
3
main/mini.nvim/mini.nvim-doc.post-upgrade
Normal file
@@ -0,0 +1,3 @@
|
||||
#!/bin/sh
|
||||
|
||||
/usr/bin/nvim -u NONE -esX "+helptags /usr/share/nvim/site/doc" +q
|
||||
Reference in New Issue
Block a user