-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Showing
11 changed files
with
198 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,110 @@ | ||
name: GitHub Pages | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
|
||
env: | ||
GHCR_IMAGE: "ghcr.io/${{ github.repository_owner }}/${{ github.event.repository.name }}" | ||
CI_XBPS_PACKAGES: "xdeb-install" | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
config: | ||
- arch: x86_64 | ||
platform: linux/amd64 | ||
- arch: i686 | ||
platform: linux/i386 | ||
- arch: aarch64 | ||
platform: linux/arm64 | ||
permissions: | ||
contents: read | ||
packages: read | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
submodules: true | ||
|
||
- name: Set up QEMU | ||
uses: docker/setup-qemu-action@v3 | ||
with: | ||
platforms: ${{ matrix.config.platform }} | ||
|
||
- name: Create XBPS packages | ||
run: | | ||
docker run --rm \ | ||
-v $(pwd):/workspace \ | ||
--platform ${{ matrix.config.platform }} \ | ||
${GHCR_IMAGE}:${{ matrix.config.arch }} \ | ||
/workspace/scripts/create_packages.sh ${{ matrix.config.arch }} ${{ matrix.config.sha256 }} | ||
- name: Create XBPS repository | ||
run: | | ||
echo -n "${{ secrets.XBPS_REPOSITORY_KEY }}" > private.pem | ||
docker run --rm \ | ||
-v $(pwd):/workspace \ | ||
--platform ${{ matrix.config.platform }} \ | ||
${GHCR_IMAGE}:${{ matrix.config.arch }} \ | ||
/workspace/scripts/sign_repository.sh ${{ matrix.config.arch }} ${{ github.repository_owner }} ${{ github.event.pusher.email }} | ||
- name: Upload repository as artifacts | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: "repository-${{ matrix.config.arch }}" | ||
path: "repository-${{ matrix.config.arch }}" | ||
|
||
merge: | ||
runs-on: ubuntu-latest | ||
needs: build | ||
permissions: | ||
contents: read | ||
packages: read | ||
container: | ||
image: ghcr.io/${{ github.repository_owner }}/${{ github.event.repository.name }}:x86_64 | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
submodules: true | ||
|
||
- name: Merge artifacts | ||
run: | | ||
mkdir -p repository | ||
mv repository-x86_64/* repository | ||
mv repository-i686/* repository | ||
mv repository-aarch64/* repository | ||
- name: Build apindex | ||
run: | | ||
cd apindex | ||
mkdir build | ||
cd build | ||
cmake .. -DCMAKE_INSTALL_PREFIX=/tmp/apindex | ||
make install | ||
- name: Generate index.html | ||
run: cd repository && /tmp/apindex/bin/apindex . | ||
|
||
- name: Upload Pages artifact | ||
uses: actions/upload-pages-artifact@v2 | ||
with: | ||
path: repository | ||
|
||
deploy: | ||
needs: merge | ||
runs-on: ubuntu-latest | ||
permissions: | ||
pages: write | ||
id-token: write | ||
environment: | ||
name: github-pages | ||
url: ${{ steps.deployment.outputs.page_url }} | ||
steps: | ||
- name: Deploy to GitHub Pages | ||
id: deployment | ||
uses: actions/deploy-pages@v2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
repository* | ||
private.key |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
[submodule "apindex"] | ||
path = apindex | ||
url = https://github.com/libthinkpad/apindex.git | ||
[submodule "void-packages"] | ||
path = void-packages | ||
url = https://github.com/void-linux/void-packages.git |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
ad824802093be7f406e4b14d1d2b260c7bbb1f45101ef4a4cd040613619a02ae |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
df44bc2b269d7ca139a8afe765b3f37b1ee2bf16b94fb8965345695485001a76 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
a4be5ba732d076a06645b666593109016d7fac49764ffff5886473ff97d07dd7 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
#!/bin/bash | ||
|
||
export XBPS_BUILD_ENVIRONMENT="void-packages-ci" | ||
export XBPS_ALLOW_RESTRICTED="yes" | ||
export XBPS_CHROOT_CMD="ethereal" | ||
export XBPS_ALLOW_CHROOT_BREAKOUT="yes" | ||
|
||
cd /workspace | ||
|
||
REPOSITORY_ARCH="${1}" | ||
XDEB_INSTALL_BINARY_SHA256=$(cat ./checksums/${REPOSITORY_ARCH}.txt) | ||
|
||
repository_dir="repository-${REPOSITORY_ARCH}" | ||
mkdir -p ${repository_dir} | ||
|
||
cd void-packages | ||
ln -s / masterdir | ||
|
||
for xbps_pkg in ${CI_XBPS_PACKAGES}; do | ||
mkdir -p srcpkgs/${xbps_pkg} | ||
cp -r ../srcpkgs/${xbps_pkg} srcpkgs/${xbps_pkg} | ||
|
||
sed -i "s/%XDEB_INSTALL_BINARY_ARCH%/${REPOSITORY_ARCH}/" srcpkgs/${xbps_pkg}/template | ||
sed -i "s/%XDEB_INSTALL_BINARY_SHA256%/${XDEB_INSTALL_BINARY_SHA256}" srcpkgs/${xbps_pkg}/template | ||
|
||
xlint ${xbps_pkg} || exit 1 | ||
./xbps-src pkg -Q ${xbps_pkg} || exit 1 | ||
done | ||
|
||
mv hostdir/binpkgs/*.xbps ../${repository_dir} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
#!/bin/bash | ||
|
||
REPOSITORY_ARCH="${1}" | ||
USER_NAME="${2}" | ||
USER_EMAIL="${3}" | ||
|
||
cd /workspace | ||
|
||
repository_dir="repository-${REPOSITORY_ARCH}" | ||
|
||
xbps-rindex -a ${repository_dir}/*.xbps | ||
xbps-rindex --sign \ | ||
--signedby "${USER_NAME} <${USER_EMAIL}>" \ | ||
--privkey private.pem \ | ||
${repository_dir} | ||
|
||
for pkg in $(ls -d -1 ${repository_dir}/*.xbps); do | ||
xbps-rindex --privkey private.pem --sign-pkg ${pkg} | ||
done |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
# Template file for 'xdeb-install' | ||
pkgname=xdeb-install | ||
version=1.0.1 | ||
revision=2 | ||
archs="%XDEB_INSTALL_BINARY_ARCH%" | ||
create_wrksrc=required | ||
short_desc="Simple tool to automate the awesome xdeb tool" | ||
maintainer="Timo Reichl <[email protected]>" | ||
license="MIT" | ||
homepage="https://github.com/thetredev/xdeb-install" | ||
distfiles="${homepage}/releases/download/v${version}/xdeb-install-linux-${archs} https://raw.githubusercontent.com/thetredev/xdeb-install/v${version}/LICENSE" | ||
checksum="%XDEB_INSTALL_BINARY_SHA256% 78dc220b8c0cb8341a9da3efaa33ff87483b81db5f9e0b94c81241a15582bc11" | ||
|
||
do_extract() { | ||
# nothing to do here, it's a prebuilt go binary | ||
# satisfy xbps-src using 'true' | ||
true | ||
} | ||
|
||
do_install() { | ||
bindir="${XBPS_SRCDISTDIR}/${pkgname}-${version}" | ||
mv ${bindir}/xdeb-install-linux-${archs} ${bindir}/xdeb-install | ||
|
||
vbin ${bindir}/xdeb-install | ||
vlicense ${bindir}/LICENSE | ||
} |
Submodule void-packages
added at
9a7b55