@@ -23,10 +23,18 @@ jobs:
2323 mkdir -p lib/src/blobs/
2424 cp argon2_library/libargon2.so.1 lib/src/blobs/libargon2-linux.so
2525 - name : Check if there are changes
26- id : changes
27- uses :
UnicornGlobal/[email protected] 26+ run : |
27+ function check() {
28+ if [[ -z "$(git status --porcelain)" ]];
29+ then
30+ echo "0"
31+ else
32+ echo "1"
33+ fi
34+ }
35+ echo "CHANGED=$(check)" >> $GITHUB_ENV
2836 - name : Push if Changed
29- if : steps.changes.outputs.changed == 1
37+ if : ${{ env.CHANGED == '1' }}
3038 run : |
3139 git config user.name "Github Actions"
3240 git config user.email "[email protected] " @@ -53,10 +61,18 @@ jobs:
5361 cd ..
5462 cp argon2_library/libargon2.1.dylib lib/src/blobs/libargon2-darwin.dylib
5563 - name : Check if there are changes
56- id : changes
57- uses :
UnicornGlobal/[email protected] 64+ run : |
65+ function check() {
66+ if [[ -z "$(git status --porcelain)" ]];
67+ then
68+ echo "0"
69+ else
70+ echo "1"
71+ fi
72+ }
73+ echo "CHANGED=$(check)" >> $GITHUB_ENV
5874 - name : Push if Changed
59- if : steps.changes.outputs.changed == 1
75+ if : ${{ env.CHANGED == '1' }}
6076 run : |
6177 git config user.name "Github Actions"
6278 git config user.email "[email protected] " @@ -85,13 +101,23 @@ jobs:
85101 - name : Copy Library
86102 run : Copy-Item “argon2_library\vs2015\build\Argon2OptDll.dll” -Destination “lib\src\blobs\libargon2-win.dll”
87103 - name : Check if there are changes
88- id : changes
89- uses :
UnicornGlobal/[email protected] 104+ run : |
105+ function check() {
106+ if [[ -z "$(git status --porcelain)" ]];
107+ then
108+ echo "0"
109+ else
110+ echo "1"
111+ fi
112+ }
113+ echo "CHANGED=$(check)" >> $GITHUB_ENV
114+ shell : bash
90115 - name : Push if Changed
91- if : steps.changes.outputs.changed == 1
116+ if : ${{ env.CHANGED == '1' }}
92117 run : |
93118 git config user.name "Github Actions"
94119 git config user.email "[email protected] " 95- git add -f lib\ src\ blobs\ libargon2-win.dll
120+ git add -f lib/ src/ blobs/ libargon2-win.dll
96121 git commit -m "Create Native Library for Windows"
97122 git push origin main
123+ shell : bash
0 commit comments