Skip to content

autobump

autobump #136

Workflow file for this run

# Automatic check for updates, if new version is available, submit a pull request
# to update the version number in .github/workflows/build.yml
name: autobump
on:
schedule:
- cron: "35 4 * * *"
push:
paths:
- .github/workflows/autobump.yml
jobs:
autobump:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
# only check for head commit
ref: main
- name: Set up Python 3.11
uses: actions/setup-python@v4
with:
python-version: 3.11
- name: Install pip dependencies
run: |
python -m pip install --upgrade pip
pip install requests semver
- name: Check for updates
id: check-update
# outputs: new_version (if new version is available)
run: python check-update.py
- name: Create pull request
uses: peter-evans/create-pull-request@v5
if: steps.check-update.outputs.new_version != ''
with:
token: ${{ secrets.CPR_TOKEN }}
commit-message: "Bump version to ${{ steps.check-update.outputs.new_version }}"
title: "Bump version to ${{ steps.check-update.outputs.new_version }}"
body: "Bump version to ${{ steps.check-update.outputs.new_version }}"
branch: autobump
branch-suffix: timestamp
delete-branch: true