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
|
|
|
|
uses: actions/checkout@v2
|
|
|
|
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
|
|
|
|
echo "::set-output name=version::$(scripts/version.sh -L)"
|
|
|
|
echo "::set-output name=full::$(scripts/version.sh)"
|
|
|
|
changelog=$(dpkg-parsechangelog -c 1 -l debian/changelog)
|
|
|
|
changelog="${changelog//'%'/'%25'}"
|
|
|
|
changelog="${changelog//$'\n'/'%0A'}"
|
|
|
|
changelog="${changelog//$'\r'/'%0D'}"
|
|
|
|
echo "::set-output name=changelog::$changelog"
|
|
|
|
echo "::set-output name=branch::${GITHUB_REF##*/}"
|
|
|
|
- name: Create Pull Request
|
|
|
|
uses: peter-evans/create-pull-request@v3
|
|
|
|
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
|