add CI
Build/Publish XBPS / build-and-publish (push) Successful in 25s
Details
Build/Publish XBPS / build-and-publish (push) Successful in 25s
Details
This commit is contained in:
parent
0eb45bab22
commit
32b34f634c
|
@ -0,0 +1,62 @@
|
|||
# yaml-language-server: $schema=https://json.schemastore.org/github-workflow.json
|
||||
name: Build/Publish XBPS
|
||||
|
||||
on:
|
||||
push:
|
||||
paths-ignore:
|
||||
- ".renovaterc.json"
|
||||
- "build.sh"
|
||||
|
||||
jobs:
|
||||
build-and-publish:
|
||||
runs-on: docker
|
||||
container: git.snaile.de/snailed/xbps-builder:2024.0502.1733
|
||||
env:
|
||||
LICENSE: "ISC"
|
||||
SHORT_DESCRIPTION: "Extremely minimalistic trash client"
|
||||
MAINTAINER: "Luca Bilke <luca@bil.ke>"
|
||||
NAME: "trash-util"
|
||||
ARCH: "x86_64"
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: https://code.forgejo.org/actions/checkout@v4
|
||||
|
||||
- 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
|
||||
mkdir -p pkg/usr/bin
|
||||
cargo build -r
|
||||
mv target/release/trash-cli pkg/usr/bin
|
||||
|
||||
- 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,24 @@
|
|||
name: Renovate
|
||||
|
||||
on:
|
||||
schedule:
|
||||
- cron: '0 */8 * * *'
|
||||
|
||||
jobs:
|
||||
renovate:
|
||||
runs-on: docker
|
||||
container: renovate/renovate@sha256:41d577babe0af3f75c1f0784b13fcf3a6850515622b584526f574c23e21366cb
|
||||
env:
|
||||
RENOVATE_TOKEN: ${{ secrets.RENOVATE_TOKEN }}
|
||||
GITHUB_COM_TOKEN: ${{ secrets.GH_NOPRIV_TOKEN }}
|
||||
RENOVATE_GIT_PRIVATE_KEY: ${{ secrets.JOHNNY5_GPG_PRIVKEY }}
|
||||
RENOVATE_PLATFORM: gitea
|
||||
RENOVATE_ENDPOINT: ${{ github.server_url }}
|
||||
RENOVATE_GIT_AUTHOR: 'Johnny5 <bot@snaile.de>'
|
||||
LOG_LEVEL: debug
|
||||
|
||||
steps:
|
||||
- uses: https://code.forgejo.org/actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v4.1.2
|
||||
|
||||
- name: Renovate
|
||||
run: renovate ${{ github.repository }}
|
|
@ -0,0 +1,5 @@
|
|||
{
|
||||
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
|
||||
"extends": ["config:best-practices"],
|
||||
"enabledManagers": ["github-actions"]
|
||||
}
|
Loading…
Reference in New Issue