Skip to content

Commit

Permalink
Merge pull request #147 from Graur/141
Browse files Browse the repository at this point in the history
Removed deprecated syntax in releases workflow
  • Loading branch information
yegor256 authored Jun 27, 2023
2 parents d350df5 + 61065f2 commit 96fa9bc
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 7 deletions.
9 changes: 4 additions & 5 deletions .github/workflows/releases.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,14 +25,13 @@ jobs:
id: daily_script
run: |
python3 auto-pull.py
echo "::set-output name=result_param::COMMIT_MESSAGE"
- name: create pull request
uses: peter-evans/create-pull-request@v5
with:
token: ${{ secrets.TOKEN }}
commit-message: New release for {{ steps.daily_script.outputs.result_param }}
title: New release for {{ steps.daily_script.outputs.result_param }}
body: New release for {{ steps.daily_script.outputs.result_param }}
commit-message: New release for ${{ env.eo_lib_version }}
title: New release for ${{ env.eo_lib_version }}
body: New release for ${{ env.eo_lib_version }}
base: master
branch: update-{{ steps.daily_script.outputs.result_param }}
branch: update-${{ env.eo_lib_version }}
delete-branch: true
7 changes: 5 additions & 2 deletions auto-pull.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,9 @@
latest_version = response.json()['tag_name']
if latest_version > version:
os.system(f'./pull.sh objectionary/{name}')
COMMIT_MESSAGE = f'{name}:{latest_version}'
print(COMMIT_MESSAGE)
env_file = os.getenv('GITHUB_ENV')
eo_lib_version = f'{name}:{latest_version}'
with open(env_file, "a") as myfile:
myfile.write(f'eo_lib_version={eo_lib_version}')
print(f'Added to env: {eo_lib_version}')
break

0 comments on commit 96fa9bc

Please sign in to comment.