pve-kernel-thunderx/.github/workflows/update.yml
2021-04-19 15:17:55 +02:00

65 lines
2.2 KiB
YAML

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
run: 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 "::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:
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