update CI
Build/Publish XBPS / build-and-publish (push) Successful in 9s Details

This commit is contained in:
Luca Bilke 2024-04-03 22:04:47 +02:00
parent b76d7ccfe4
commit cead781767
No known key found for this signature in database
GPG Key ID: AD6630D0A1E650AC
1 changed files with 18 additions and 15 deletions

View File

@ -7,9 +7,16 @@ 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>"
NAME: "dwm-custom"
ARCH: "x86_64"
steps: steps:
- name: Checkout - name: Checkout
uses: https://code.forgejo.org/actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v4.1.2 uses: https://code.forgejo.org/actions/checkout@v4
with: with:
submodules: true submodules: true
@ -19,7 +26,7 @@ jobs:
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=${{ vars.NAME }}-${MAJOR}.${MINOR}.${PATCH}_1" >> $GITHUB_ENV echo "PACKAGE_NAME=${{ env.NAME }}-${MAJOR}.${MINOR}.${PATCH}_1" >> $GITHUB_ENV
- name: Build - name: Build
run: | run: |
@ -32,32 +39,28 @@ jobs:
cp -f config.h dwm-final cp -f config.h dwm-final
cd dwm-final && make clean install DESTDIR="${GITHUB_WORKSPACE}/pkg" PREFIX="/usr" cd dwm-final && make clean install DESTDIR="${GITHUB_WORKSPACE}/pkg" PREFIX="/usr"
- name: Prep packaging directory
run: |
set -xeu
- name: Create package - name: Create package
run : | run : |
set -xeu set -xeu
export XBPS_TARGET_ARCH=${{ vars.ARCH }} export XBPS_TARGET_ARCH=${{ env.ARCH }}
mkdir /target mkdir /target
cd /target || exit 1 cd /target || exit 1
xbps-create -A ${{ vars.ARCH }} \ xbps-create -A ${{ env.ARCH }} \
-H "${{ github.server_url }}/${{ github.repository }}" \ -H "${{ github.server_url }}/${{ github.repository }}" \
-l "${{ vars.LICENSE }}" \ -l "${{ env.LICENSE }}" \
-n "${{ env.PACKAGE_NAME }}" \ -n "${{ env.PACKAGE_NAME }}" \
-m "${{ vars.MAINTAINER }}" \ -m "${{ env.MAINTAINER }}" \
-s "${{ vars.SHORT_DESCRIPTION }}" \ -s "${{ env.SHORT_DESCRIPTION }}" \
-D "${{ vars.DEPENDENCIES }}" \ -D "${{ env.DEPENDENCIES }}" \
"${GITHUB_WORKSPACE}/pkg" "${GITHUB_WORKSPACE}/pkg"
- name: Push Package - name: Push Package
run: | run: |
set -xeu set -xeu
curl -so "/target/${{ vars.ARCH }}-repodata" "https://xbps.snaile.de/${{ vars.ARCH }}-repodata" curl -so "/target/${{ env.ARCH }}-repodata" "https://xbps.snaile.de/${{ env.ARCH }}-repodata"
xbps-rindex --add "/target/${{ env.PACKAGE_NAME }}.${{ vars.ARCH }}.xbps" xbps-rindex --add "/target/${{ env.PACKAGE_NAME }}.${{ env.ARCH }}.xbps"
echo '${{ secrets.XBPS_SIGNING_KEY }}' >/tmp/privkey.pem 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" XBPS_PASSPHRASE=${{ secrets.XBPS_SIGNING_PASSPHRASE }} xbps-rindex --privkey /tmp/privkey.pem --sign-pkg --signedby "${{ env.MAINTAINER }}" "/target/${{ env.PACKAGE_NAME }}.${{ env.ARCH }}.xbps"
rm /tmp/privkey.pem rm /tmp/privkey.pem
ls -lAH /target 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/$(basename $1)"' find-shell {} \; 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/$(basename $1)"' find-shell {} \;