File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change 1
1
on :
2
2
workflow_dispatch :
3
3
schedule :
4
- - cron : ' 0 0 * * *'
4
+ - cron : ' 0 5 * * *'
5
5
jobs :
6
6
update :
7
7
runs-on : ubuntu-latest
28
28
git config --global user.email "gardenlinux@users.noreply.github.com"
29
29
git commit -am 'Update kernel ${{ steps.update.outputs.has-update }}'
30
30
git push --set-upstream origin update-kernel
31
- gh pr create --base main --head update-kernel --title 'Update kernel ${{ steps.update.outputs.has-update }}' --body "automated update" --reviewer fwilhe
31
+ UPDATE_PR_LINK=$(gh pr create --base main --head update-kernel --title 'Update kernel ${{ steps.update.outputs.has-update }}' --body "automated update" --reviewer fwilhe)
32
+ # We have to trigger our own workflow run because github does not do that when the pr is created by automation
33
+ # This also means that we don't have the nice UI integration of test runs, so we add a comment to the workflow url for tracing purposes
32
34
gh workflow run "build.yml" --ref "update-kernel"
35
+ RUN_URL=$(gh run list --workflow=build.yml --limit=1 --json=url --jq='.[0].url')
36
+ gh pr comment $UPDATE_PR_LINK --body "CI workflow created: $RUN_URL"
33
37
fi
34
38
env :
35
39
GH_TOKEN : ${{ secrets.GITHUB_TOKEN }}
You can’t perform that action at this time.
0 commit comments