Skip to content

Update main.yml

Update main.yml #12

Workflow file for this run

name: Update Version
on:
push:
branches:
- '**'
jobs:
update_version:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- 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 requests
- name: Run script
run: |
export VERSION='1.0.0'
python script.py
- name: Commit and push if it changed
run: |
git config --global user.email "[email protected]"
git config --global user.name "Sai Prudhvi"
git diff --quiet && git diff --staged --quiet || (git commit -am "Updated variables"; git push)