update ci
Update void-packages template / Update xbps-src template (push) Has been cancelled
Details
Update void-packages template / Update xbps-src template (push) Has been cancelled
Details
This commit is contained in:
parent
2372d492d8
commit
b245b2d574
|
@ -1,62 +0,0 @@
|
|||
# yaml-language-server: $schema=https://json.schemastore.org/github-workflow.json
|
||||
name: Build/Publish XBPS
|
||||
|
||||
on:
|
||||
push:
|
||||
paths:
|
||||
- "src**"
|
||||
- "config.h"
|
||||
|
||||
jobs:
|
||||
build-and-publish:
|
||||
runs-on: docker
|
||||
container: git.snaile.de/snailed/xbps-builder:2024.0520.2027@sha256:19295b8f229fffa436956f35c6f0ce266adbe11e5a44edbe24d9e0ed29edabd6
|
||||
env:
|
||||
LICENSE: "GPL-2.0"
|
||||
SHORT_DESCRIPTION: "Customized dwmblocks-async"
|
||||
MAINTAINER: "Luca Bilke <luca@bil.ke>"
|
||||
NAME: "dwmblocks-custom"
|
||||
ARCH: "x86_64"
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: https://code.forgejo.org/actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4
|
||||
with:
|
||||
submodules: true
|
||||
|
||||
- name: Generate tag and package name
|
||||
run: |
|
||||
set -xeu
|
||||
MAJOR=$(date +%Y)
|
||||
MINOR=$(date +%m%d)
|
||||
PATCH=$(date +%H%M)
|
||||
echo "PACKAGE_NAME=${{ env.NAME }}-${MAJOR}.${MINOR}.${PATCH}_1" >> $GITHUB_ENV
|
||||
|
||||
- name: Build
|
||||
run: |
|
||||
set -xeu
|
||||
make clean install DESTDIR="${GITHUB_WORKSPACE}/pkg" PREFIX="/usr"
|
||||
|
||||
- name: Create package
|
||||
run: |
|
||||
set -xeu
|
||||
export XBPS_TARGET_ARCH=${{ env.ARCH }}
|
||||
mkdir /target
|
||||
cd /target || exit 1
|
||||
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 }}" \
|
||||
"${GITHUB_WORKSPACE}/pkg"
|
||||
|
||||
- name: Push Package
|
||||
run: |
|
||||
set -xeu
|
||||
curl -so "/target/${{ env.ARCH }}-repodata" "https://xbps.snaile.de/${{ env.ARCH }}-repodata"
|
||||
xbps-rindex --add "/target/${{ env.PACKAGE_NAME }}.${{ env.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 "${{ env.MAINTAINER }}" "/target/${{ env.PACKAGE_NAME }}.${{ env.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/$(basename $1)"' find-shell {} \;
|
|
@ -0,0 +1,37 @@
|
|||
# yaml-language-server: $schema=https://json.schemastore.org/github-workflow.json
|
||||
name: Update void-packages template
|
||||
|
||||
on:
|
||||
push:
|
||||
tags: ["*"]
|
||||
|
||||
jobs:
|
||||
update-template:
|
||||
name: Update xbps-src template
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 0
|
||||
token: ${{ secrets.FORGEJO_PUSH_TOKEN }}
|
||||
repository: "snailed/void-packages"
|
||||
sparse-checkout: "srcpkgs/dwmblocks-custom/"
|
||||
ref: "master"
|
||||
|
||||
- name: Modify template
|
||||
id: checksum
|
||||
run: |
|
||||
sed -i '/version=/ c version=${{ github.ref_name }}' srcpkgs/dwmblocks-custom/template
|
||||
|
||||
wget https://git.snaile.de/snailed/dwmblocks-custom/archive/${{ github.ref_name }}.tar.gz
|
||||
sha256sum="$(sha256sum ${{ github.ref_name }}.tar.gz | cut -d ' ' -f 1)"
|
||||
sed -i "/checksum=/ c checksum=${sha256sum}" srcpkgs/dwmblocks-custom/template
|
||||
sed -i "/revision=/ c revision=1" srcpkgs/dwmblocks-custom/template
|
||||
|
||||
- name: Commit
|
||||
uses: https://github.com/stefanzweifel/git-auto-commit-action@3ea6ae190baf489ba007f7c92608f33ce20ef04a # v4.16.0
|
||||
with:
|
||||
commit_user_name: "Johnny5"
|
||||
commit_user_email: "bot@snaile.de"
|
||||
commit_author: "Johnny5 <bot@snaile.de>"
|
||||
commit_message: "dwmblocks-custom: update to ${{ github.ref_name }}."
|
Loading…
Reference in New Issue