Check kernel version #103
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Check kernel version | |
on: | |
schedule: | |
- cron: '30 5 * * 1,2,3,4' | |
workflow_dispatch: | |
jobs: | |
update_kernel_info: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v2 | |
with: | |
token: ${{ secrets.GHUB_BOT }} | |
fetch-depth: 0 | |
- name: Set up Python | |
uses: actions/setup-python@v2 | |
with: | |
python-version: '3.x' | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install beautifulsoup4 requests | |
- name: Update kernel information in script | |
run: | | |
for branch in main arc; do | |
git checkout $branch | |
if [[ $branch == "arc" ]]; then | |
python utils/update_kernel.py --arc | |
else | |
python utils/update_kernel.py | |
fi | |
git config user.name "GitHub Actions Bot" | |
git config user.email "[email protected]" | |
git add base/2_kernel_setup.sh | |
git diff-index --quiet HEAD || git commit -m "Update kernel information" | |
git push origin $branch | |
done | |