You've already forked KernelSU
mirror of
https://github.com/tiann/KernelSU.git
synced 2025-08-27 23:46:34 +00:00
Bumps the actions group with 3 updates in the / directory: [actions/checkout](https://github.com/actions/checkout), [actions/download-artifact](https://github.com/actions/download-artifact) and [actions/setup-java](https://github.com/actions/setup-java). Updates `actions/checkout` from 4 to 5 - [Release notes](https://github.com/actions/checkout/releases) - [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md) - [Commits](https://github.com/actions/checkout/compare/v4...v5) Updates `actions/download-artifact` from 4 to 5 - [Release notes](https://github.com/actions/download-artifact/releases) - [Commits](https://github.com/actions/download-artifact/compare/v4...v5) Updates `actions/setup-java` from 4 to 5 - [Release notes](https://github.com/actions/setup-java/releases) - [Commits](https://github.com/actions/setup-java/compare/v4...v5) --- updated-dependencies: - dependency-name: actions/checkout dependency-version: '5' dependency-type: direct:production update-type: version-update:semver-major dependency-group: actions - dependency-name: actions/download-artifact dependency-version: '5' dependency-type: direct:production update-type: version-update:semver-major dependency-group: actions - dependency-name: actions/setup-java dependency-version: '5' dependency-type: direct:production update-type: version-update:semver-major dependency-group: actions ... Signed-off-by: dependabot[bot] <support@github.com>
61 lines
2.5 KiB
YAML
61 lines
2.5 KiB
YAML
name: handle-add-device-issue
|
|
|
|
on:
|
|
issues:
|
|
types: [labeled]
|
|
|
|
jobs:
|
|
handle-add-device:
|
|
if: github.event.label.name == 'add-device'
|
|
runs-on: ubuntu-latest
|
|
env:
|
|
ISSUE_CONTENT: ${{ github.event.issue.body }}
|
|
steps:
|
|
- uses: actions/checkout@v5
|
|
- name: Parse issue body
|
|
id: handle-add-device
|
|
run: |
|
|
python3 scripts/add_device_handler.py website/docs/repos.json || true
|
|
- name: Commit
|
|
if: steps.handle-add-device.outputs.success == 'true'
|
|
run: |
|
|
git config --local user.name "GitHub Actions"
|
|
git config --local user.email "41898282+github-actions[bot]@users.noreply.github.com"
|
|
git add website/docs/repos.json
|
|
git commit -m "add device: ${{ steps.handle-add-device.outputs.device }}"
|
|
- name: Make pull request
|
|
if: steps.handle-add-device.outputs.success == 'true'
|
|
id: cpr
|
|
uses: peter-evans/create-pull-request@v7
|
|
with:
|
|
token: ${{ secrets.GITHUB_TOKEN }}
|
|
commit-message: "[add device]: ${{ steps.handle-add-device.outputs.device }}"
|
|
title: "[add device]: ${{ steps.handle-add-device.outputs.device }}"
|
|
body: |
|
|
${{ steps.handle-add-device.outputs.device }} has been added to the website.
|
|
Related issue: ${{ github.event.issue.html_url }}
|
|
branch: "add-device-${{ github.event.issue.number }}"
|
|
labels: add-device
|
|
delete-branch: true
|
|
sign-commits: true
|
|
- name: Check outputs
|
|
if: ${{ steps.cpr.outputs.pull-request-number }}
|
|
run: |
|
|
echo "Pull Request Number - ${{ steps.cpr.outputs.pull-request-number }}"
|
|
echo "Pull Request URL - ${{ steps.cpr.outputs.pull-request-url }}"
|
|
- uses: Kernel-SU/actions-comment-on-issue@master
|
|
if: ${{ steps.cpr.outputs.pull-request-number }}
|
|
with:
|
|
message: "Automatically created pull request: ${{ steps.cpr.outputs.pull-request-url }}"
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
- uses: Kernel-SU/actions-comment-on-issue@master
|
|
if: steps.handle-add-device.outputs.success != 'true'
|
|
with:
|
|
message: "Cannot create pull request. Please check the issue content. Or you can create a pull request manually."
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
- name: close issue
|
|
uses: peter-evans/close-issue@v3
|
|
with:
|
|
issue-number: ${{ github.event.issue.number }}
|
|
token: ${{ secrets.GITHUB_TOKEN }}
|