Skip to content

Commit

Permalink
Update pr-if-new-kernel.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
fwilhe authored Oct 15, 2024
1 parent 80b7e6e commit 1aa564f
Showing 1 changed file with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions .github/workflows/pr-if-new-kernel.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,26 +5,29 @@ on:
jobs:
update:
runs-on: ubuntu-latest

permissions:
pull-requests: write
contents: write
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '3.12'
- run: |
OUTPUT=${python update-kernel.py}
OUTPUT=$(python update-kernel.py)
echo $OUTPUT
echo "has-update=$OUTPUT" >> "$GITHUB_OUTPUT"
id: update
- name: create pull request
run: |
if [[ '${{ steps.update.outputs.has-update }}' ]]; then
git branch update-kernel
git checkout -b update-kernel
git add prepare_source
git config --global user.name "Garden Linux Builder"
git config --global user.email "gardenlinux@users.noreply.github.com"
git commit -m 'Update kernel ${{ steps.update.outputs.has-update }}'
gh pr create --base main --head update-kernel --title 'Update kernel ${{ steps.update.outputs.has-update }}' --reviewer gardenlinux/garden-linux-maintainers
git commit -am 'Update kernel ${{ steps.update.outputs.has-update }}'
git push --set-upstream origin update-kernel
gh pr create --base main --head update-kernel --title 'Update kernel ${{ steps.update.outputs.has-update }}' --body "automated update" --reviewer gardenlinux/garden-linux-maintainers
fi
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 comments on commit 1aa564f

Please sign in to comment.