2020-11-12 16:26:52 +00:00
|
|
|
name: Kernel Watch
|
|
|
|
|
|
|
|
on:
|
|
|
|
workflow_dispatch:
|
|
|
|
schedule:
|
2020-11-12 17:08:42 +00:00
|
|
|
- cron: '0 12 * * *' # Every day
|
2020-11-12 16:26:52 +00:00
|
|
|
|
|
|
|
jobs:
|
|
|
|
check:
|
|
|
|
name: Check for new Release
|
|
|
|
runs-on: [ubuntu-latest]
|
|
|
|
strategy:
|
|
|
|
matrix:
|
2022-10-26 10:07:55 +00:00
|
|
|
branch: ['v6.0.x']
|
2020-11-12 16:26:52 +00:00
|
|
|
steps:
|
|
|
|
- name: Checkout Sources
|
2022-10-26 11:24:54 +00:00
|
|
|
uses: actions/checkout@v3
|
2020-11-12 16:26:52 +00:00
|
|
|
with:
|
|
|
|
ref: ${{ matrix.branch }}
|
2021-04-20 19:03:51 +00:00
|
|
|
submodules: recursive
|
2020-11-12 16:26:52 +00:00
|
|
|
- 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"
|
2022-12-14 00:10:34 +00:00
|
|
|
echo "version=$NEW" >> $GITHUB_OUTPUT
|
2020-11-12 16:26:52 +00:00
|
|
|
- name: Trigger Update
|
|
|
|
if: ${{ steps.check.outputs.version }}
|
|
|
|
uses: benc-uk/workflow-dispatch@v1
|
|
|
|
with:
|
|
|
|
workflow: Kernel Update
|
2021-04-19 13:17:55 +00:00
|
|
|
token: ${{ secrets.PAT }} # Custom token needed to recursively trigger workflows
|
|
|
|
inputs: '{ "tag": "v${{ steps.check.outputs.version }}" }'
|
2020-11-12 16:26:52 +00:00
|
|
|
ref: ${{ matrix.branch }}
|
|
|
|
|