File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11name : Regenerate Python Library
22on :
3- release :
4- types : [created]
3+ workflow_dispatch :
4+
55jobs :
66 build :
77 runs-on : ubuntu-latest
88 steps :
9+ - name : Get current date
10+ id : date
11+ run : echo "::set-output name=date::$(date +'%Y%m%d
912 - name : Set release name as environment variable
1013 run : echo "RELEASE_NAME=${{ github.event.release.tag_name }}" >> $GITHUB_ENV
1114 - uses : actions/checkout@v3
1215 - name : Set up Python
1316 uses : actions/setup-python@v4
1417 with :
15- python-version : ' 3.x '
18+ python-version : ' 3.10 '
1619 - name : Install dependencies
1720 run : |
1821 python -m pip install --upgrade pip
@@ -23,13 +26,10 @@ jobs:
2326 - name : Regenerate Python Library
2427 run : |
2528 python generator/generate_library.py -g true -v $RELEASE_NAME
26- - name : Commit changes
27- run : |
28- git config --global user.name "GitHub Action on behalf of TKIPisalegacycipher"
29- git config --global user.email "support@meraki.com"
30- git add .
31- git commit -m "Auto-update library to release version $RELEASE_NAME."
32- - name : Push changes
33- uses : ad-m/github-push-action@master
29+ - name : Commit changes to new branch
30+ uses : EndBug/add-and-commit@v9
3431 with :
35- github_token : ${{ secrets.ACTION_RUNNER_GITHUB_TOKEN }}
32+ author_name : GitHub Action
33+ author_email : support@meraki.com
34+ message : Automatically regenerated library.
35+ new_branch : release
You can’t perform that action at this time.
0 commit comments