Write github var env with the package python script
This commit is contained in:
+4
-1
@@ -10,4 +10,7 @@ def get_folder_name():
|
||||
|
||||
if __name__ == "__main__":
|
||||
name = get_folder_name()
|
||||
# print(f'Show this value : {name}')
|
||||
|
||||
with open('$GITHUB_ENV', 'a') as f:
|
||||
f.write(f'APP_NAME={name}')
|
||||
f.write(f'NAME_PACKAGE={name}.zip')
|
||||
|
||||
@@ -41,11 +41,10 @@ jobs:
|
||||
- name: Setup package name
|
||||
run: |
|
||||
echo "With python, get a folder name"
|
||||
python '.github/package.py'
|
||||
echo "set with output value"
|
||||
echo "Default env variable ${{env.APP_NAME}}"
|
||||
echo "APP_NAME={$(python .github/package.py)}" >> $GITHUB_ENV
|
||||
echo "NAME_PACKAGE={${{env.APP_NAME}}.zip}" >> $GITHUB_ENV
|
||||
python '.github/package.py'
|
||||
# echo "APP_NAME={$(python .github/package.py)}" >> $GITHUB_ENV
|
||||
# echo "NAME_PACKAGE={${{env.APP_NAME}}.zip}" >> $GITHUB_ENV
|
||||
echo "show env variable app name ${{env.APP_NAME}}"
|
||||
echo "show env variable package ${{env.NAME_PACKAGE}}"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user