Skip to content

Commit

Permalink
Merge pull request #15 from Sai-prudhvi1483/Sai-prudhvi1483-patch-12
Browse files Browse the repository at this point in the history
Update main.yml
  • Loading branch information
Sai-prudhvi1483 authored Apr 16, 2024
2 parents afce2fd + 541a06b commit 5f81c8d
Showing 1 changed file with 10 additions and 17 deletions.
27 changes: 10 additions & 17 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,34 +2,27 @@ name: Update Version

on:
push:
branches:
- '**'
branches: [ main ]

jobs:
update_version:
build:

runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v2
- uses: actions/checkout@v2

- name: Set up Python
- name: Set up Python 3.8
uses: actions/setup-python@v2
with:
python-version: '3.x'
python-version: 3.8

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install requests
run: pip install PyGithub

- name: Run script
- name: Update Version
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)
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 comments on commit 5f81c8d

Please sign in to comment.