fix build process
Build/Publish XBPS / build-and-publish (push) Has been cancelled Details

This commit is contained in:
Luca Bilke 2024-04-03 10:50:24 +02:00
parent 328bcf1187
commit 900b637c46
No known key found for this signature in database
GPG Key ID: B753481DA0B6FA47
1 changed files with 29 additions and 32 deletions

View File

@ -1,3 +1,4 @@
# yaml-language-server: $schema=https://json.schemastore.org/github-workflow.json
name: Build/Publish XBPS name: Build/Publish XBPS
on: [push] on: [push]
@ -6,61 +7,57 @@ jobs:
build-and-publish: build-and-publish:
runs-on: docker runs-on: docker
container: git.snaile.de/snailed/xbps-builder:2024.4.843 container: git.snaile.de/snailed/xbps-builder:2024.4.843
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: steps:
- name: Checkout - name: Checkout
uses: https://code.forgejo.org/actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v4.1.2 uses: https://code.forgejo.org/actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v4.1.2
with: with:
submodules: true submodules: true
- name: Generate and package name - name: Generate tag and package name
run: | run: |
set -xeu
MAJOR=$(date +%Y) MAJOR=$(date +%Y)
MINOR=$(date +%m | sed 's/^0//') MINOR=$(date +%m | sed 's/^0//')
PATCH=$(date +%H%M | sed 's/^0//') PATCH=$(date +%H%M | sed 's/^0//')
echo "PACKAGE_NAME=${{ env.NAME }}-${MAJOR}.${MINOR}.${PATCH}_1" >> $GITHUB_ENV echo "PACKAGE_NAME=${{ vars.NAME }}-${MAJOR}.${MINOR}.${PATCH}_1" >> $GITHUB_ENV
- name: Patch - name: Build
run: | run: |
set -xeu
cp -f config.mk patches.h dwm-flexipatch/ cp -f config.mk patches.h dwm-flexipatch/
bash flexipatch-finalizer/flexipatch-finalizer.sh -r -d dwm-flexipatch -o dwm-final bash flexipatch-finalizer/flexipatch-finalizer.sh -r -d dwm-flexipatch -o dwm-final
for patch in patches/*.diff; do for patch in patches/*.diff; do
patch -d dwm-final <"$patch" patch -d dwm-final <"$patch"
done done
cp -f config.h dwm-final/ cp -f config.h dwm-final
cd dwm-final || exit 1 cd dwm-final && make clean install DESTDIR="${GITHUB_WORKSPACE}/pkg" PREFIX="/usr"
- name: Build - name: Prep packaging directory
run: make clean install DESTDIR="${GITHUB_WORKSPACE}/pkg" PREFIX="/usr"
- name: Prep signing directory
run: | run: |
set -xeu
- name: Create package
run : |
set -xeu
export XBPS_TARGET_ARCH=${{ vars.ARCH }}
mkdir /target mkdir /target
curl -o "/target/${{ env.ARCH }}-repodata" "https://xbps.snaile.de/${{ env.ARCH }}-repodata" cd /target || exit 1
xbps-create -A ${{ vars.ARCH }} \
- name: Package
run: |
export XBPS_TARGET_ARCH=${{ env.ARCH }}
xbps-create -A ${{ env.ARCH }} \
-H "${{ github.server_url }}/${{ github.repository }}" \ -H "${{ github.server_url }}/${{ github.repository }}" \
-l "${{ env.LICENSE }}" \ -l "${{ vars.LICENSE }}" \
-n "${{ env.PACKAGE_NAME }}" \ -n "${{ env.PACKAGE_NAME }}" \
-m "${{ env.MAINTAINER }}" \ -m "${{ vars.MAINTAINER }}" \
-s "${{ env.SHORT_DESCRIPTION }}" \ -s "${{ vars.SHORT_DESCRIPTION }}" \
-D "${{ env.DEPENDENCIES }}" \ -D "${{ vars.DEPENDENCIES }}" \
"${GITHUB_WORKSPACE}/pkg" "${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 - name: Push Package
run: | run: |
for f in /target/*; do set -xeu
curl --digest -u "Johnny5:${{ secret.XBPS_WEBDAV_KEY }}" -T "${f}" "https://xbps.snaile.de/dav/${f}" curl -so "/target/${{ vars.ARCH }}-repodata" "https://xbps.snaile.de/${{ vars.ARCH }}-repodata"
done xbps-rindex --add "/target/${{ env.PACKAGE_NAME }}.${{ vars.ARCH }}.xbps"
echo "${{ secrets.XBPS_SIGNING_KEY }}" >/tmp/privkey.pem
XBPS_PASSPHRASE=${{ secrets.XBPS_SIGNING_PASSPHRASE }} xbps-rindex --privkey /tmp/privkey.pem --sign-pkg --signedby "${{ vars.MAINTAINER }}" "/target/${{ env.PACKAGE_NAME }}.${{ vars.ARCH }}.xbps"
rm /tmp/privkey.pem
ls -lAH /target
find /target -type f -exec sh -c 'curl -X PUT --digest -u "${{ vars.XBPS_WEBDAV_USER }}:${{ secrets.XBPS_WEBDAV_KEY }}" -T "${1}" "https://xbps.snaile.de/dav/$(basename $1)"' find-shell {} \;