pve-kernel-thunderx/.github/workflows/update.yml

71 lines
2.4 KiB
YAML
Raw Normal View History

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
- uses: tibdex/github-app-token@v1
id: generate-token
with:
app_id: ${{ secrets.APP_ID }}
private_key: ${{ secrets.APP_PRIVATE_KEY }}
- 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=base::$(scripts/version.sh -B)"
echo "::set-output name=branch::${GITHUB_REF##*/}"
- name: Create Pull Request
uses: peter-evans/create-pull-request@v3
with:
token: ${{ steps.generate-token.outputs.token }} # Custom token needed to recursively trigger workflows
commit-message: |
Add Linux ${{ steps.update.outputs.version }}
This change updates the kernel to Linux ${{ steps.update.outputs.version }} based on Ubuntu ${{ steps.update.outputs.base }}.
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