Clean-up workflows
This commit is contained in:
parent
d93f512cf0
commit
f804a05ab9
4 changed files with 24 additions and 202 deletions
|
@ -1,14 +1,16 @@
|
||||||
name: Kernel Build
|
name: Kernel Release
|
||||||
|
|
||||||
on: push
|
on:
|
||||||
|
push:
|
||||||
|
tags:
|
||||||
|
- 'v*'
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
release-build:
|
||||||
name: Build
|
name: Build
|
||||||
runs-on: aarch64
|
runs-on: aarch64
|
||||||
container:
|
container:
|
||||||
image: debian:bookworm
|
image: debian:bookworm
|
||||||
if: ${{ !contains(github.event.head_commit.message, 'skip ci') }}
|
|
||||||
steps:
|
steps:
|
||||||
- name: Setup build environment
|
- name: Setup build environment
|
||||||
run: |
|
run: |
|
||||||
|
@ -29,9 +31,25 @@ jobs:
|
||||||
--tool 'apt-get -o --no-install-recommends --yes' \
|
--tool 'apt-get -o --no-install-recommends --yes' \
|
||||||
--install debian/control
|
--install debian/control
|
||||||
- name: Build Kernel
|
- name: Build Kernel
|
||||||
run: debuild -e CCACHE_DIR=/var/cache/ccache --prepend-path=/usr/lib/ccache --jobs=auto -b -uc -us
|
run: debuild --no-lintian -ePVE* --jobs=auto -b -uc -us
|
||||||
- name: Upload Artifacts
|
- name: Upload Artifacts
|
||||||
uses: actions/upload-artifact@v3
|
uses: actions/upload-artifact@v3
|
||||||
with:
|
with:
|
||||||
name: debs
|
name: debs
|
||||||
path: "*.deb"
|
path: "../*.deb"
|
||||||
|
release-deploy:
|
||||||
|
needs: [release-build]
|
||||||
|
runs-on: aarch64
|
||||||
|
container:
|
||||||
|
image: alpine:latest
|
||||||
|
steps:
|
||||||
|
- name: Setting up environment
|
||||||
|
run: apk add nodejs curl findutils
|
||||||
|
- name: Package download
|
||||||
|
uses: forgejo/download-artifact@v3
|
||||||
|
- name: Package deployment
|
||||||
|
run: |
|
||||||
|
find -name '*.deb' > deb.list
|
||||||
|
while read file; do
|
||||||
|
curl --user ${{ vars.FORGE_REPO_USER }}:${{ secrets.FORGE_REPO_PRIVKEY }} --upload-file "$file" https://ayakael.net/api/packages/forge/debian/pool/bookworm/main/upload
|
||||||
|
done < deb.list
|
|
@ -1,87 +0,0 @@
|
||||||
name: Kernel Release
|
|
||||||
|
|
||||||
on:
|
|
||||||
pull_request:
|
|
||||||
types: [closed]
|
|
||||||
branches:
|
|
||||||
- v*
|
|
||||||
- flavor/*/v*
|
|
||||||
workflow_dispatch:
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
build:
|
|
||||||
name: Build (${{ matrix.debian }})
|
|
||||||
runs-on: [self-hosted, '${{ matrix.debian }}']
|
|
||||||
if: ${{ github.event_name == 'workflow_dispatch' || github.event.pull_request.merged == true }}
|
|
||||||
strategy:
|
|
||||||
matrix:
|
|
||||||
debian: [bullseye]
|
|
||||||
include:
|
|
||||||
- build_profile: 'generic'
|
|
||||||
build_cc: gcc
|
|
||||||
build_cflags: ''
|
|
||||||
steps:
|
|
||||||
- name: Clean Workspace
|
|
||||||
run: rm -rf *.deb *.ddeb *.build *.buildinfo *.changes
|
|
||||||
- name: Checkout Sources
|
|
||||||
uses: actions/checkout@v3
|
|
||||||
with:
|
|
||||||
submodules: recursive
|
|
||||||
path: pve-edge-kernel
|
|
||||||
- name: Clean Repository
|
|
||||||
run: git -C pve-edge-kernel submodule foreach git clean -ffdx
|
|
||||||
- name: Build Kernel
|
|
||||||
run: |
|
|
||||||
cd pve-edge-kernel
|
|
||||||
debian/rules debian/control
|
|
||||||
if [ "$PVE_BUILD_PROFILE" != "generic" ]; then
|
|
||||||
debchange -l +$PVE_BUILD_PROFILE -D edge --force-distribution -U -M "Specialization for $PVE_BUILD_PROFILE"
|
|
||||||
fi
|
|
||||||
debuild --no-lintian -e PVE* -e CCACHE_DIR=/var/cache/ccache --prepend-path=/usr/lib/ccache --jobs=auto -b -uc -us
|
|
||||||
env:
|
|
||||||
PVE_BUILD_PROFILE: ${{ matrix.build_profile }}
|
|
||||||
PVE_KERNEL_CC: ${{ matrix.build_cc }}
|
|
||||||
PVE_KERNEL_CFLAGS: ${{ matrix.build_cflags }}
|
|
||||||
PVE_ZFS_CC: ${{ matrix.build_cc }}
|
|
||||||
- name: Upload Artifacts
|
|
||||||
uses: actions/upload-artifact@v3
|
|
||||||
with:
|
|
||||||
name: ${{ matrix.debian }}-${{ matrix.build_profile }}
|
|
||||||
path: "*.deb"
|
|
||||||
publish:
|
|
||||||
name: Publish
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
if: ${{ github.event_name == 'workflow_dispatch' || github.event.pull_request.merged == true }}
|
|
||||||
needs: build
|
|
||||||
steps:
|
|
||||||
- name: Checkout Sources
|
|
||||||
uses: actions/checkout@v3
|
|
||||||
- name: Download Artifacts
|
|
||||||
uses: actions/download-artifact@v3
|
|
||||||
with:
|
|
||||||
path: artifacts
|
|
||||||
- name: Delete Debug Symbols
|
|
||||||
run: rm -f artifacts/*/*dbgsym*.deb
|
|
||||||
- name: Format Release Name
|
|
||||||
id: format_release
|
|
||||||
run: |
|
|
||||||
echo "release=$(scripts/version.sh)" >> $GITHUB_OUTPUT
|
|
||||||
changelog=$(dpkg-parsechangelog -c 1 -l debian/changelog)
|
|
||||||
echo "changelog<<EOF\n$changelog\nEOF" >> $GITHUB_OUTPUT
|
|
||||||
- name: Create Release
|
|
||||||
uses: ncipollo/release-action@v1
|
|
||||||
with:
|
|
||||||
commit: ${{ github.sha }}
|
|
||||||
tag: v${{ steps.format_release.outputs.release }}
|
|
||||||
body: ${{ steps.format_release.outputs.changelog }}
|
|
||||||
token: ${{ secrets.PAT }}
|
|
||||||
artifacts: "artifacts/bullseye-generic/pve-headers-*.deb,artifacts/bullseye-generic/pve-kernel-*.deb,artifacts/bullseye-generic/linux-tools-*.deb"
|
|
||||||
- name: Release to CloudSmith
|
|
||||||
run: |
|
|
||||||
pip install --upgrade cloudsmith-cli
|
|
||||||
find artifacts/bullseye-generic \
|
|
||||||
-name '*.deb' \
|
|
||||||
-not -name "*dbgsym*" \
|
|
||||||
-exec cloudsmith push deb pve-edge/kernel/debian/bullseye {} --republish \;
|
|
||||||
env:
|
|
||||||
CLOUDSMITH_API_KEY: ${{ secrets.CLOUDSMITH_API_KEY }}
|
|
|
@ -1,62 +0,0 @@
|
||||||
name: Kernel Update
|
|
||||||
|
|
||||||
on:
|
|
||||||
workflow_dispatch:
|
|
||||||
inputs:
|
|
||||||
tag:
|
|
||||||
description: 'Tag of the Linux Kernel to update to'
|
|
||||||
required: true
|
|
||||||
version:
|
|
||||||
description: 'Custom version number'
|
|
||||||
required: false
|
|
||||||
release:
|
|
||||||
description: 'Custom release number'
|
|
||||||
required: false
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
update:
|
|
||||||
name: Update
|
|
||||||
runs-on: [ubuntu-latest]
|
|
||||||
steps:
|
|
||||||
- name: Checkout Sources
|
|
||||||
uses: actions/checkout@v3
|
|
||||||
with:
|
|
||||||
submodules: recursive
|
|
||||||
- name: Setup System Dependencies
|
|
||||||
run: sudo apt update && sudo apt install devscripts
|
|
||||||
- name: Update Kernel
|
|
||||||
id: update
|
|
||||||
run: |
|
|
||||||
TAG=${{ github.event.inputs.tag }}
|
|
||||||
VERSION=${{ github.event.inputs.version }}
|
|
||||||
RELEASE=${{ github.event.inputs.release }}
|
|
||||||
VERSION_OPT=${VERSION:+-v ${VERSION}}
|
|
||||||
RELEASE_OPT=${RELEASE:+-r ${RELEASE}}
|
|
||||||
./scripts/update.sh -t ${{ github.event.inputs.tag }} $VERSION_OPT $RELEASE_OPT
|
|
||||||
echo "version=$(scripts/version.sh -L)" >> $GITHUB_OUTPUT
|
|
||||||
echo "full=$(scripts/version.sh)" >> $GITHUB_OUTPUT
|
|
||||||
changelog=$(dpkg-parsechangelog -c 1 -l debian/changelog)
|
|
||||||
echo "changelog<<EOF\n$changelog\nEOF" >> $GITHUB_OUTPUT
|
|
||||||
echo "branch=${GITHUB_REF##*/}" >> $GITHUB_OUTPUT
|
|
||||||
- name: Create Pull Request
|
|
||||||
uses: peter-evans/create-pull-request@v4
|
|
||||||
with:
|
|
||||||
token: ${{ secrets.PAT }} # Custom token needed to recursively trigger workflows
|
|
||||||
author: Fabian Mastenbroek <mail.fabianm@gmail.com>
|
|
||||||
commit-message: |
|
|
||||||
Add Linux ${{ steps.update.outputs.version }}
|
|
||||||
|
|
||||||
This change updates the kernel to Linux ${{ steps.update.outputs.version }}.
|
|
||||||
branch: staging/v${{ steps.update.outputs.full }}
|
|
||||||
branch-suffix: short-commit-hash
|
|
||||||
delete-branch: true
|
|
||||||
title: "Add Linux ${{ steps.update.outputs.version }}"
|
|
||||||
body: |
|
|
||||||
Automated pull request to update the kernel to Linux ${{ steps.update.outputs.version }}.
|
|
||||||
|
|
||||||
**Changelog:**
|
|
||||||
```
|
|
||||||
${{ steps.update.outputs.changelog }}
|
|
||||||
```
|
|
||||||
labels: |
|
|
||||||
release
|
|
|
@ -1,47 +0,0 @@
|
||||||
name: Kernel Watch
|
|
||||||
|
|
||||||
on:
|
|
||||||
workflow_dispatch:
|
|
||||||
schedule:
|
|
||||||
- cron: '0 12 * * *' # Every day
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
check:
|
|
||||||
name: Check for new Release
|
|
||||||
runs-on: [ubuntu-latest]
|
|
||||||
strategy:
|
|
||||||
matrix:
|
|
||||||
branch: ['v6.0.x']
|
|
||||||
steps:
|
|
||||||
- name: Checkout Sources
|
|
||||||
uses: actions/checkout@v3
|
|
||||||
with:
|
|
||||||
ref: ${{ matrix.branch }}
|
|
||||||
submodules: recursive
|
|
||||||
- name: Setup System Dependencies
|
|
||||||
run: sudo apt install jq curl
|
|
||||||
- name: Check for Release
|
|
||||||
id: check
|
|
||||||
run: |
|
|
||||||
NEW=$(scripts/check.sh ${{ matrix.branch }})
|
|
||||||
if [[ -z $NEW ]]; then
|
|
||||||
echo "No new release found"
|
|
||||||
exit 0
|
|
||||||
fi
|
|
||||||
echo "Found new Linux kernel version $NEW"
|
|
||||||
STAGING=$(git ls-remote --heads origin "staging/v$NEW*")
|
|
||||||
if [[ $STAGING ]]; then
|
|
||||||
echo "Existing staging update found"
|
|
||||||
exit 0
|
|
||||||
fi
|
|
||||||
echo "No staging update found: triggering update"
|
|
||||||
echo "version=$NEW" >> $GITHUB_OUTPUT
|
|
||||||
- name: Trigger Update
|
|
||||||
if: ${{ steps.check.outputs.version }}
|
|
||||||
uses: benc-uk/workflow-dispatch@v1
|
|
||||||
with:
|
|
||||||
workflow: Kernel Update
|
|
||||||
token: ${{ secrets.PAT }} # Custom token needed to recursively trigger workflows
|
|
||||||
inputs: '{ "tag": "v${{ steps.check.outputs.version }}" }'
|
|
||||||
ref: ${{ matrix.branch }}
|
|
||||||
|
|
Loading…
Reference in a new issue