experimental forgejo action
Build/Publish XBPS / lint (push) Has been cancelled
Details
Build/Publish XBPS / lint (push) Has been cancelled
Details
This commit is contained in:
parent
929fdee683
commit
ba44b04f57
|
@ -0,0 +1,63 @@
|
|||
name: Build/Publish XBPS
|
||||
|
||||
on: [push]
|
||||
|
||||
jobs:
|
||||
lint:
|
||||
runs-on: docker
|
||||
container: git.snaile.de/snailed/xbps-builder:2024.4.2245
|
||||
env:
|
||||
LICENSE: GPL-2.0
|
||||
SHORT_DESCRIPTION: Customized dwm
|
||||
DEPENDENCIES: pango>=1.44,glibc>=2.32,libX11>=1.2,libXft>=2.3.8,libXinerama>=1.0.3,fontconfig>=2.6.0
|
||||
MAINTAINER: Luca Bilke <luca@bil.ke>
|
||||
ARCH: x86_64
|
||||
NAME: dwm-custom
|
||||
steps:
|
||||
- uses: https://code.forgejo.org/actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v4.1.2
|
||||
|
||||
- name: Generate and package name
|
||||
run: |
|
||||
MAJOR=$(date +%Y)
|
||||
MINOR=$(date +%m | sed 's/^0//')
|
||||
PATCH=$(date +%H%M | sed 's/^0//')
|
||||
echo "PACKAGE_NAME=${{ env.NAME }}-${MAJOR}.${MINOR}.${PATCH}_1" >> $GITHUB_ENV
|
||||
|
||||
- name: Patch
|
||||
run: |
|
||||
cp -f config.mk patches.h dwm-flexipatch/
|
||||
bash flexipatch-finalizer/flexipatch-finalizer.sh -r -d dwm-flexipatch -o dwm-final
|
||||
for patch in patches/*.diff; do
|
||||
patch -d dwm-final <"$patch"
|
||||
done
|
||||
cp -f config.h dwm-final/
|
||||
cd dwm-final || exit 1
|
||||
|
||||
- name: Build
|
||||
run: make clean install DESTDIR="${GITHUB_WORKSPACE}/pkg" PREFIX="/usr"
|
||||
|
||||
- name: Prep signing directory
|
||||
run: |
|
||||
mkdir /target
|
||||
curl -o "/target/${{ env.ARCH }}-repodata" "https://xbps.snaile.de/${{ env.ARCH }}-repodata"
|
||||
|
||||
- name: Package
|
||||
run: |
|
||||
export XBPS_TARGET_ARCH=${{ env.ARCH }}
|
||||
xbps-create -A ${{ env.ARCH }} \
|
||||
-H "${{ github.server_url }}/${{ github.repository }}" \
|
||||
-l "${{ env.LICENSE }}" \
|
||||
-n "${{ env.PACKAGE_NAME }}" \
|
||||
-m "${{ env.MAINTAINER }}" \
|
||||
-s "${{ env.SHORT_DESCRIPTION }}" \
|
||||
-D "${{ env.DEPENDENCIES }}" \
|
||||
"${GITHUB_WORKSPACE}/pkg"
|
||||
echo '${{ secret.XBPS_SIGNING_KEY }}' >~/.ssh/id_rsa
|
||||
xbps-rindex -a /target/${{ env.PACKAGE_NAME }}.${{ env.ARCH }}.xbps
|
||||
xbps-rindex -S --signedby "Luca Bilke <luca@bil.ke>" /target/${{ env.PACKAGE_NAME }}.${{ env.ARCH }}.xbps
|
||||
|
||||
- name: Push Package
|
||||
run: |
|
||||
for f in /target/*; do
|
||||
curl --digest -u "Johnny5:${{ secret.XBPS_WEBDAV_KEY }}" -T "${f}" "https://xbps.snaile.de/dav/${f}"
|
||||
done
|
|
@ -1,64 +0,0 @@
|
|||
when:
|
||||
- event: tag
|
||||
- event: manual
|
||||
|
||||
steps:
|
||||
build:
|
||||
image: git.snaile.de/snailed/xbps-builder
|
||||
commands:
|
||||
- cp -f config.mk patches.h dwm-flexipatch/
|
||||
- bash flexipatch-finalizer/flexipatch-finalizer.sh -r -d dwm-flexipatch -o dwm-final
|
||||
- |
|
||||
for patch in patches/*.diff; do
|
||||
patch -d dwm-final <"$patch"
|
||||
done
|
||||
- cp -f config.h dwm-final/
|
||||
- cd dwm-final || exit 1
|
||||
- make clean install DESTDIR="$${CI_WORKSPACE}/pkg" PREFIX="/usr"
|
||||
|
||||
package-xbps:
|
||||
image: ghcr.io/void-linux/void-musl-busybox
|
||||
environment:
|
||||
- LICENSE=GPL-2.0
|
||||
- SHORT_DESCRIPTION=Customized dwm
|
||||
- DEPENDENCIES=pango>=1.44,glibc>=2.32,libX11>=1.2,libXft>=2.3.8,libXinerama>=1.0.3,fontconfig>=2.6.0
|
||||
commands: |
|
||||
xbps-create -A x86_64 \
|
||||
-H "$${CI_REPO_URL}" \
|
||||
-l "$${LICENSE}" \
|
||||
-n "$${CI_REPO_NAME}-$${CI_COMMIT_TAG}_1" \
|
||||
-m "$${CI_COMMIT_AUTHOR} <$${CI_COMMIT_AUTHOR_EMAIL}>" \
|
||||
-s "$${SHORT_DESCRIPTION}" \
|
||||
-D "$${DEPENDENCIES}" \
|
||||
"$${CI_WORKSPACE}/pkg"
|
||||
|
||||
# package-targz:
|
||||
# image: alpine
|
||||
# commands:
|
||||
# - tar czf $${CI_REPO_NAME}-$${CI_COMMIT_TAG}.tar.gz --directory=$${CI_WORKSPACE}/pkg .
|
||||
#
|
||||
# publish:
|
||||
# image: woodpeckerci/plugin-gitea-release
|
||||
# settings:
|
||||
# base_url: https://git.snaile.de
|
||||
# files:
|
||||
# - "${CI_REPO_NAME}-${CI_COMMIT_TAG}.tar.gz"
|
||||
# api_key:
|
||||
# from_secret: gitea_release
|
||||
# target: main
|
||||
|
||||
publish-xbps:
|
||||
image: ghcr.io/void-linux/void-musl-busybox
|
||||
environment:
|
||||
- XBPS_TARGET_ARCH=x86_64
|
||||
secrets:
|
||||
- source: xbps_pem_passphrase
|
||||
target: XBPS_PASSPHRASE
|
||||
volumes:
|
||||
- /var/www/xbps:/target
|
||||
- /etc/woodpecker/:/etc/woodpecker:ro
|
||||
commands:
|
||||
- export XBPS_TARGET_ARCH
|
||||
- mv $${CI_REPO_NAME}-$${CI_COMMIT_TAG}_1.x86_64.xbps /target
|
||||
- xbps-rindex -a /target/$${CI_REPO_NAME}-$${CI_COMMIT_TAG}_1.x86_64.xbps
|
||||
- xbps-rindex -S --signedby "$${CI_COMMIT_AUTHOR} <$${CI_COMMIT_AUTHOR_EMAIL}>" --privkey /etc/woodpecker/privkey.pem /target/$${CI_REPO_NAME}-$${CI_COMMIT_TAG}_1.x86_64.xbps
|
Loading…
Reference in New Issue