Skip to content

Prevent reloading the script unless it's only the .py script being mo… #13

Prevent reloading the script unless it's only the .py script being mo…

Prevent reloading the script unless it's only the .py script being mo… #13

Workflow file for this run

name: Update_CalVer
on:
push:
branches:
- 'main'
paths-ignore:
- '**.md'
- '**.yml'
- 'Dockerfile**'
workflow_dispatch:
jobs:
docker:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Set Calver Version
uses: Nelyx/[email protected]
id: setcalver
with:
default_branch: 'refs/heads/main'
format: 'YYYY.M.D'
version_prefix: ''
- name: Update version file
run: |
sed -i "s/subgen_version =.*/subgen_version = '${{ steps.setcalver.outputs.package_version }}'/" subgen/subgen.py
- name: Commit and push changes
run: |
git config --global user.name "GitHub Actions"
git config --global user.email "[email protected]"
git add subgen/subgen.py
git commit -m "Automated update subgen.py with version"
git push