Skip to content

Update Toolkit

Update Toolkit #26

name: Update Toolkit
on:
schedule:
- cron: '0 0 * * 6' # Run every Saturday at midnight
workflow_dispatch:
jobs:
update-versions:
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: 3.11
- name: Install Dependencies
run: |
python -m pip install --upgrade pip
# Dependencies for python script under 'scripts'
python -m pip install -r script_requirements.txt
- name: Get Latest Version
run: python scripts/check_latest_version.py "./toolkit_info.json"
- name: Update Version
run: python scripts/update_latest_version.py "./toolkit_info.json" "./Dockerfile" "./README.md"
- name: Prepare PR changelog
run: |
# Init PR description
echo "core: update tool versions" > pr-changelog.txt
echo "" >> pr-changelog.txt
# Add details version changed PR description
python scripts/parse_diff.py "./toolkit_info.json" >> pr-changelog.txt
# Additional PR description info
echo "" >> pr-changelog.txt
echo "Auto-generated by [create-pull-request](https://github.com/peter-evans/create-pull-request)" >> pr-changelog.txt
cat pr-changelog.txt
- name: Create Pull Request
id: cpr
uses: peter-evans/create-pull-request@v6
with:
token: ${{ secrets.PAT }}
commit-message: 'core: update tool versions'
committer: 'github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>'
author: '${{ github.actor }} <${{ github.actor_id }}+${{ github.actor }}@users.noreply.github.com>'
signoff: false
branch: update-toolkit
branch-suffix: timestamp
delete-branch: true
base: 'main'
title: 'core: update tool versions'
body-path: pr-changelog.txt
labels: 'upgrade, automated-pr, core'