2020-09-17 15:24:01 +00:00
|
|
|
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
|
2022-10-26 11:24:54 +00:00
|
|
|
uses: actions/checkout@v3
|
2020-09-17 15:24:01 +00:00
|
|
|
with:
|
|
|
|
submodules: recursive
|
|
|
|
- name: Setup System Dependencies
|
2022-05-23 14:46:43 +00:00
|
|
|
run: sudo apt update && sudo apt install devscripts
|
2020-09-17 15:24:01 +00:00
|
|
|
- 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
|
2022-12-14 00:10:34 +00:00
|
|
|
echo "version=$(scripts/version.sh -L)" >> $GITHUB_OUTPUT
|
|
|
|
echo "full=$(scripts/version.sh)" >> $GITHUB_OUTPUT
|
2020-09-17 15:24:01 +00:00
|
|
|
changelog=$(dpkg-parsechangelog -c 1 -l debian/changelog)
|
2022-12-14 01:00:18 +00:00
|
|
|
echo "changelog<<EOF\n$changelog\nEOF" >> $GITHUB_OUTPUT
|
2022-12-14 00:10:34 +00:00
|
|
|
echo "branch=${GITHUB_REF##*/}" >> $GITHUB_OUTPUT
|
2020-09-17 15:24:01 +00:00
|
|
|
- name: Create Pull Request
|
2022-10-26 11:24:54 +00:00
|
|
|
uses: peter-evans/create-pull-request@v4
|
2020-09-17 15:24:01 +00:00
|
|
|
with:
|
2021-04-19 13:17:55 +00:00
|
|
|
token: ${{ secrets.PAT }} # Custom token needed to recursively trigger workflows
|
|
|
|
author: Fabian Mastenbroek <mail.fabianm@gmail.com>
|
2020-09-17 15:24:01 +00:00
|
|
|
commit-message: |
|
|
|
|
Add Linux ${{ steps.update.outputs.version }}
|
|
|
|
|
2021-04-19 13:17:55 +00:00
|
|
|
This change updates the kernel to Linux ${{ steps.update.outputs.version }}.
|
2020-09-17 15:24:01 +00:00
|
|
|
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
|