Compare commits

..

1 commit

Author SHA1 Message Date
bcbc7a1f51
Automatically checksum renovated packages
Some checks failed
build / checksum (push) Waiting to run
build / Check package changes (push) Blocked by required conditions
build / Build packages (push) Blocked by required conditions
build / Deploy repository (push) Blocked by required conditions
renovate / renovate (push) Has been cancelled
2025-06-23 13:14:10 +02:00
4 changed files with 56 additions and 110 deletions

View file

@ -1,11 +1,15 @@
name: build
on:
# a package changed (usually in PR)
workflow_run:
workflows: [ChecksumUpdate]
types: [completed]
# we are integrating updates
pull_request:
paths:
- "srcpkgs/**"
types:
- opened
- reopened
- synchronize
branches:
- main
push:
paths:
- "srcpkgs/**"
@ -13,24 +17,51 @@ on:
- main
jobs:
checksum:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
ref: ${{ github.ref }}
- name: get changed package
run: |
echo "CHANGED_PKG=$(git diff --name-only origin/main ${GITHUB_HEAD_REF} "srcpkgs/*/template" | head -1 | cut -d/ -f2)" >> $GITHUB_ENV
- name: checkout upstream templates
if: ${{ env.CHANGED_PKG != '' }}
uses: actions/checkout@v4
with:
repository: void-linux/void-packages
ref: master
fetch-depth: 1
path: distdir
- name: generate checksum
if: ${{ env.CHANGED_PKG != '' }}
run: |
XBPS_DISTDIR="$PWD/distdir" xgensum -i ${{ env.CHANGED_PKG }}
- name: Commit
if: ${{ env.CHANGED_PKG != '' }}
uses: stefanzweifel/git-auto-commit-action@v6
with:
file_pattern: "*/template"
commit_message: "Update checksum"
changedpkgs:
name: Check package changes
needs: [checksum]
runs-on: ubuntu-latest
if: "${{ github.event.workflow_run.conclusion == 'success' }} && !contains(github.event.pull_request.title, '[ci skip]') && !contains(github.event.pull_request.body, '[ci skip]')"
if: "!contains(github.event.pull_request.title, '[ci skip]') && !contains(github.event.pull_request.body, '[ci skip]')"
outputs:
changed: ${{ steps.grabchanged.outputs.changed }}
steps:
- name: checkout local templates from prev workflow
if: "${{ github.event_name == 'workflow_run' }}"
uses: actions/checkout@v4
with:
fetch-depth: 0
ref: ${{ github.event.workflow_run.head_branch }}
- name: checkout local templates
if: "${{ github.event_name != 'workflow_run' }}"
uses: actions/checkout@v4
with:
fetch-depth: 0
@ -69,7 +100,7 @@ jobs:
# - { arch: aarch64-musl, host: x86_64-musl, libc: musl, platform: linux/amd64, test: 0 }
container:
image: ghcr.io/void-linux/void-${{ matrix.config.libc }}-full:latest
image: ghcr.io/void-linux/void-${{ matrix.config.libc }}-full:20250227R1
options: --platform ${{ matrix.config.platform }} --privileged
volumes:
- /dev:/dev
@ -116,7 +147,7 @@ jobs:
- name: Find changed templates
env:
CHANGED: ${{ needs.changedpkgs.outputs.changed }}
run: sudo -Eu builder echo "${{ env.CHANGED }}" | sed 's/ /\n/g' > /tmp/templates
run: sudo -Eu builder echo "$CHANGED" | sed 's/ /\n/g' > /tmp/templates
- name: Build and check packages
run: sudo -Eu builder common/travis/build.sh "$BOOTSTRAP" "$ARCH" "$TEST"
@ -126,10 +157,8 @@ jobs:
- name: Archive xbps artifacts
uses: actions/upload-artifact@v4
env:
CHANGED: ${{ needs.changedpkgs.outputs.changed }}
with:
name: binaries-${{ env.CHANGED }}-${{ matrix.config.arch }}-${{ matrix.config.libc }}.xbps
name: binaries-${{ matrix.config.arch }}-${{ matrix.config.libc }}
path: |
hostdir/binpkgs/*.xbps
@ -158,10 +187,10 @@ jobs:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}-deployment
cancel-in-progress: false
if: "github.ref == 'refs/heads/main' && github.event_name != 'workflow_run' && !contains(github.event.pull_request.title, '[ci skip]') && !contains(github.event.pull_request.body, '[ci skip]')"
if: "github.ref == 'refs/heads/main' && !contains(github.event.pull_request.title, '[ci skip]') && !contains(github.event.pull_request.body, '[ci skip]')"
container:
image: ghcr.io/void-linux/void-glibc-full:latest
image: ghcr.io/void-linux/void-glibc-full:20250227R1
options: --privileged
steps:
@ -201,13 +230,6 @@ jobs:
run: |
xbps-rindex --add $PWD/*.xbps
xbps-rindex --clean $PWD
xbps-rindex --remove $PWD
- name: Commit new repo state
uses: stefanzweifel/git-auto-commit-action@v6
with:
file_pattern: "*.xbps *.xbps.sig2"
commit_message: "Update package repo"
# - name: checksum
# run: |

View file

@ -1,79 +0,0 @@
name: ChecksumUpdate
on:
pull_request:
paths:
- "srcpkgs/**"
types:
- opened
- synchronize
branches:
- main
jobs:
checksum:
runs-on: ubuntu-latest
container:
image: ghcr.io/void-linux/void-glibc-full:latest
options: --platform linux/amd64 --privileged
volumes:
- /dev:/dev
env:
ARCH: x86_64
BOOTSTRAP: x86_64
TEST: 1
steps:
- name: Prepare container
run: |
# switch to repo-ci mirror
mkdir -p /etc/xbps.d && cp /usr/share/xbps.d/*-repository-*.conf /etc/xbps.d/
sed -i 's|repo-default|repo-ci|g' /etc/xbps.d/*-repository-*.conf
# install dependencies
xbps-install -Suy xbps && xbps-install -Suy sudo xtools bash git
# create non-root user
useradd -G xbuilder -M builder
- name: checkout local templates
uses: actions/checkout@v4
with:
fetch-depth: 0
ref: ${{ github.ref }}
- name: remember changed package
run: |
git config --global --add safe.directory $PWD
echo "CHANGED_PKG=$(git diff --name-only origin/main origin/${GITHUB_HEAD_REF} "srcpkgs/*/template" | head -1 | cut -d/ -f2)" >> $GITHUB_ENV
echo "CHANGED: ${{ env.CHANGED_PKG }}"
- name: checkout upstream templates
uses: actions/checkout@v4
with:
repository: void-linux/void-packages
ref: master
fetch-depth: 1
path: upstream
- name: prep masterdir
working-directory: upstream
run: |
chown -R builder:builder . &&
sudo -Eu builder common/travis/set_mirror.sh &&
sudo -Eu builder common/travis/prepare.sh
- name: copy to upstream
run: cp -rv srcpkgs/* upstream/srcpkgs
- name: generate checksum
working-directory: upstream
run: "sudo -Eu builder xgensum -f -i ${{ env.CHANGED_PKG }}"
- name: receive relevant copy from upstream
run: |
cp -r "upstream/srcpkgs/${{ env.CHANGED_PKG }}" srcpkgs
- name: commit new checksum
uses: stefanzweifel/git-auto-commit-action@v6
with:
file_pattern: "srcpkgs/${{ env.CHANGED_PKG }}/template"
commit_message: "Update ${{ env.CHANGED_PKG }} checksum"

View file

@ -1,7 +1,10 @@
name: Check package updates
name: renovate
on:
schedule:
- cron: "0 * * * *"
push:
paths:
- ".github/**" # TODO: remove after debugging
env:
LOG_LEVEL: "info"

View file

@ -1,6 +1,6 @@
# Template file for 'ripgrep-all'
pkgname=ripgrep-all
version=0.10.9 # renovate: datasource=github-tags depName=phiresky/ripgrep-all
version=0.10.6 # renovate: datasource=github-tags depName=phiresky/ripgrep-all
revision=2
build_style=cargo
hostmakedepends="rust pkg-config"
@ -13,7 +13,7 @@ maintainer="Marty Oehme <contact@martyoeh.me>"
license="AGPL-3.0-only"
homepage="https://github.com/phiresky/ripgrep-all"
distfiles="${homepage}/archive/v${version}.tar.gz"
checksum=a5b3150940dcddd35a26e9de398f11a563d0466a335e5450ceb7ff369e9fef45
checksum=06cd619ad6638be206266a77fdf11034dc2dc15d97b3a057b0d6280a17334680
post_install() {
vdoc README.md